Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application/StarMainApplication_sdl.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-07-07 04:44:01 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-07-07 04:44:01 +1000
commitd313a3ceb35e167c1f47399ec5c787f94140a5b1 (patch)
tree77545287d4fe3b3e21d73c40a58486abe09f1732 /source/application/StarMainApplication_sdl.cpp
parent4b0d1cb90d774e31f50a13ced58aad9ab4768490 (diff)
OpenGL: use 4.1 core
necessary for modern Mac support
Diffstat (limited to 'source/application/StarMainApplication_sdl.cpp')
-rw-r--r--source/application/StarMainApplication_sdl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp
index d0b3dc3..d6cea76 100644
--- a/source/application/StarMainApplication_sdl.cpp
+++ b/source/application/StarMainApplication_sdl.cpp
@@ -305,6 +305,10 @@ public:
int height;
SDL_GetWindowSize(m_sdlWindow, &width, &height);
m_windowSize = Vec2U(width, height);
+
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
m_sdlGlContext = SDL_GL_CreateContext(m_sdlWindow);
if (!m_sdlGlContext)