internal/ui: use EGL for OpenGL ES

Updates #292
This commit is contained in:
Hajime Hoshi 2022-11-13 06:23:26 -08:00
parent e5e7ceb688
commit d09fd90963
2 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ const (
const (
AutoIconify = Hint(0x00020006)
ClientAPI = Hint(0x00022001)
ContextCreationAPI = Hint(0x0002200B)
ContextVersionMajor = Hint(0x00022002)
ContextVersionMinor = Hint(0x00022003)
Decorated = Hint(0x00020005)
@ -82,6 +83,7 @@ const (
CursorDisabled = 0x00034003
CursorHidden = 0x00034002
CursorNormal = 0x00034001
EGLContextAPI = 0x00036002
NoAPI = 0
OpenGLAPI = 0x00030001
OpenGLESAPI = 0x00030002

View File

@ -24,4 +24,5 @@ func setGLFWClientAPI() {
glfw.WindowHint(glfw.ClientAPI, glfw.OpenGLESAPI)
glfw.WindowHint(glfw.ContextVersionMajor, 2)
glfw.WindowHint(glfw.ContextVersionMinor, 0)
glfw.WindowHint(glfw.ContextCreationAPI, glfw.EGLContextAPI)
}