switch to OpenGL 2.1

This commit is contained in:
faiface 2017-05-27 13:14:13 +02:00
parent 28aad855b8
commit fa2c741fcf
2 changed files with 4 additions and 6 deletions

View File

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

View File

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