Skip to content

Commit

Permalink
OpenGL profile
Browse files Browse the repository at this point in the history
  • Loading branch information
myaaaaaaaaa committed Jul 5, 2024
1 parent 5702838 commit 08cb91a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Install dependencies (linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install libgl1-mesa-dev
run: sudo apt-get update && sudo apt-get install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev xvfb

- name: Check out module
uses: actions/checkout@v2
Expand Down
9 changes: 8 additions & 1 deletion gl41_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !darwin

package gl_test

import (
Expand Down Expand Up @@ -113,10 +115,15 @@ func TestBasic(t *testing.T) {
}
defer glfw.Terminate()

glfw.WindowHint(glfw.Visible, glfw.False)
//glfw.WindowHint(glfw.Visible, glfw.False)
glfw.WindowHint(glfw.ContextVersionMajor, 4)
glfw.WindowHint(glfw.ContextVersionMinor, 1)

// Needed for OS X
// https://www.glfw.org/faq.html#41---how-do-i-create-an-opengl-30-context
glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)
glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile)

window, err := glfw.CreateWindow(800, 600, "Test", nil, nil)
if err != nil {
t.Fatal("failed to create glfw window:", err)
Expand Down

0 comments on commit 08cb91a

Please sign in to comment.