Skip to content

Commit c24693c

Browse files
committed
add (unexported) constants for version numbers
1 parent daa7304 commit c24693c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gl/egl.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ package gl
1111
// #cgo LDFLAGS: -lEGL
1212
import "C"
1313

14+
const (
15+
versionES2 = "GL_ES_2_0"
16+
versionES3 = "GL_ES_3_0"
17+
)
18+
1419
func init() {
1520
display := C.eglGetDisplay(C.EGL_DEFAULT_DISPLAY)
1621

@@ -43,12 +48,12 @@ func init() {
4348

4449
context := C.eglCreateContext(display, config, C.EGLContext(C.EGL_NO_CONTEXT), &attributes[0])
4550
if context == nil {
46-
version = "GL_ES_2_0"
51+
version = versionES2
4752

4853
return
4954
}
5055

5156
C.eglDestroyContext(display, context)
5257

53-
version = "GL_ES_3_0"
58+
version = versionES3
5459
}

0 commit comments

Comments
 (0)