diff --git a/internal/glfw/const.go b/internal/glfw/const.go index 252b8fbbb..0069dba35 100644 --- a/internal/glfw/const.go +++ b/internal/glfw/const.go @@ -97,6 +97,7 @@ const ( CursorHidden = 0x00034002 CursorNormal = 0x00034001 NoAPI = 0 + OpenGLAPI = 0x00030001 ) const ( diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 07f0e86a4..9b733223b 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -129,6 +129,7 @@ func initialize() error { return err } glfw.WindowHint(glfw.Visible, glfw.False) + glfw.WindowHint(glfw.ClientAPI, glfw.NoAPI) // Create a window to set the initial monitor. w, err := glfw.CreateWindow(16, 16, "", nil, nil) @@ -657,6 +658,7 @@ func (u *UserInterface) run(context driver.UIContext) error { u.window = nil if u.Graphics().IsGL() { + glfw.WindowHint(glfw.ClientAPI, glfw.OpenGLAPI) glfw.WindowHint(glfw.ContextVersionMajor, 2) glfw.WindowHint(glfw.ContextVersionMinor, 1) } else {