Skip to content

Commit e166127

Browse files
elvodqaWebFreak001
authored andcommitted
Add required attribute to make it run on MacOS
1 parent b9cd882 commit e166127

File tree

1 file changed

+3
-1
lines changed
  • templates/EmptyOpenGL_SDL/source

1 file changed

+3
-1
lines changed

templates/EmptyOpenGL_SDL/source/app.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ int main()
1818

1919
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
2020
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
21-
21+
// This is needed to run on macos
22+
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
23+
2224
auto window = SDL_CreateWindow("OpenGL 3.2 App", SDL_WINDOWPOS_UNDEFINED,
2325
SDL_WINDOWPOS_UNDEFINED, 400, 300, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);
2426
if (!window)

0 commit comments

Comments
 (0)