From d313a3ceb35e167c1f47399ec5c787f94140a5b1 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 7 Jul 2024 04:44:01 +1000 Subject: OpenGL: use 4.1 core necessary for modern Mac support --- source/application/StarMainApplication_sdl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/application/StarMainApplication_sdl.cpp') 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) -- cgit v1.2.3