diff --git a/pixelgl/canvas.go b/pixelgl/canvas.go index 9e1efeb..b8e4057 100644 --- a/pixelgl/canvas.go +++ b/pixelgl/canvas.go @@ -380,7 +380,7 @@ var canvasUniformFormat = glhf.AttrFormat{ } var canvasVertexShader = ` -#version 130 +#version 330 core in vec2 position; in vec4 color; @@ -405,7 +405,7 @@ void main() { ` var canvasFragmentShader = ` -#version 130 +#version 330 core in vec4 Color; in vec2 TexCoords; diff --git a/pixelgl/window.go b/pixelgl/window.go index 76523a5..afbd5f7 100644 --- a/pixelgl/window.go +++ b/pixelgl/window.go @@ -90,8 +90,10 @@ func NewWindow(cfg WindowConfig) (*Window, error) { err := mainthread.CallErr(func() error { var err error - glfw.WindowHint(glfw.ContextVersionMajor, 2) - glfw.WindowHint(glfw.ContextVersionMinor, 1) + glfw.WindowHint(glfw.ContextVersionMajor, 3) + glfw.WindowHint(glfw.ContextVersionMinor, 3) + glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile) + glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True) glfw.WindowHint(glfw.Resizable, bool2int[cfg.Resizable]) glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])