Skip to content

Commit

Permalink
To OpenGL v3.3 which is most compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Jul 18, 2023
1 parent 3d8dbde commit 4553f76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/opengl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"runtime"

"github.com/go-gl/gl/v4.1-core/gl"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/go-gl/glfw/v3.3/glfw"
"github.com/tdewolff/canvas"
"github.com/tdewolff/canvas/renderers/opengl"
Expand All @@ -28,8 +28,8 @@ func main() {
defer glfw.Terminate()

glfw.WindowHint(glfw.Resizable, glfw.False)
glfw.WindowHint(glfw.ContextVersionMajor, 4)
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)

Expand Down
4 changes: 2 additions & 2 deletions renderers/opengl/opengl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"image"
"strings"

"github.com/go-gl/gl/v4.1-core/gl"
"github.com/go-gl/gl/v3.3-core/gl"
"github.com/tdewolff/canvas"
"github.com/tdewolff/canvas/renderers/rasterizer"
)
Expand Down Expand Up @@ -170,7 +170,7 @@ var fragmentShaderSource = `
// "image/color"
// "strings"
//
// "github.com/go-gl/gl/v4.6-core/gl"
// "github.com/go-gl/gl/v3.3-core/gl"
//)
//
//var vertexShaderSource = `
Expand Down

0 comments on commit 4553f76

Please sign in to comment.