diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75a9ed7..2811fcd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/gl41_test.go b/gl41_test.go index 12fd665..4da6530 100644 --- a/gl41_test.go +++ b/gl41_test.go @@ -1,3 +1,5 @@ +//go:build !darwin + package gl_test import ( @@ -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)