Skip to content

Commit

Permalink
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG is required on macOS
Browse files Browse the repository at this point in the history
When requesting a Core Context.
  • Loading branch information
past-due committed Mar 17, 2018
1 parent 80476d4 commit 64576ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sdl/main_sdl.cpp
Expand Up @@ -1655,6 +1655,7 @@ bool wzMainScreenSetup(int antialiasing, bool fullscreen, bool vsync, bool highD
}

#if defined(WZ_USE_OPENGL_3_2_CORE_PROFILE)
// SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG is *required* to obtain an OpenGL >= 3 Core Context on macOS
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
Expand Down

0 comments on commit 64576ba

Please sign in to comment.