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 84842fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .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 All @@ -30,4 +30,5 @@ jobs:
go-version-file: go.mod

- name: Run tests
run: go test -v -race ./...
if: ${{ matrix.os == 'ubuntu-latest' }}
run: xvfb-run go test -v
5 changes: 5 additions & 0 deletions gl41_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func TestBasic(t *testing.T) {
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 84842fc

Please sign in to comment.