From 9ba9eb2ac33a53a8fd50ce14d40be00d42a9f7af Mon Sep 17 00:00:00 2001 From: LDA Date: Thu, 17 Oct 2024 00:16:44 -0700 Subject: only set minimum opengl context version on macos --- source/application/StarMainApplication_sdl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/application/StarMainApplication_sdl.cpp') diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp index 6b0ca4c..557e02d 100644 --- a/source/application/StarMainApplication_sdl.cpp +++ b/source/application/StarMainApplication_sdl.cpp @@ -314,10 +314,12 @@ public: int height; SDL_GetWindowSize(m_sdlWindow, &width, &height); m_windowSize = Vec2U(width, height); - + +#ifdef __APPLE__ 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); +#endif m_sdlGlContext = SDL_GL_CreateContext(m_sdlWindow); if (!m_sdlGlContext) -- cgit v1.2.3