move gl.Enable call to inside gl context in window creation

This commit is contained in:
Anten Skrabec 2021-06-21 14:13:43 -06:00
parent 80b107c039
commit 7615c055cf
1 changed files with 1 additions and 2 deletions

View File

@ -131,8 +131,6 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile)
glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)
gl.Enable(gl.MULTISAMPLE)
glfw.WindowHint(glfw.Resizable, bool2int[cfg.Resizable])
glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])
glfw.WindowHint(glfw.Floating, bool2int[cfg.AlwaysOnTop])
@ -170,6 +168,7 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
// enter the OpenGL context
w.begin()
glhf.Init()
gl.Enable(gl.MULTISAMPLE)
w.end()
return nil