switch back to OpenGL 3.3 (OS X issues)

This commit is contained in:
faiface 2017-06-10 15:11:45 +02:00
parent 1fd110ce4c
commit cfdc8beb81
2 changed files with 6 additions and 4 deletions

View File

@ -380,7 +380,7 @@ var canvasUniformFormat = glhf.AttrFormat{
} }
var canvasVertexShader = ` var canvasVertexShader = `
#version 130 #version 330 core
in vec2 position; in vec2 position;
in vec4 color; in vec4 color;
@ -405,7 +405,7 @@ void main() {
` `
var canvasFragmentShader = ` var canvasFragmentShader = `
#version 130 #version 330 core
in vec4 Color; in vec4 Color;
in vec2 TexCoords; in vec2 TexCoords;

View File

@ -90,8 +90,10 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
err := mainthread.CallErr(func() error { err := mainthread.CallErr(func() error {
var err error var err error
glfw.WindowHint(glfw.ContextVersionMajor, 2) glfw.WindowHint(glfw.ContextVersionMajor, 3)
glfw.WindowHint(glfw.ContextVersionMinor, 1) 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.Resizable, bool2int[cfg.Resizable])
glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated]) glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])