From 5e61febf16a9d8d6197e5ea3ceadda12ba21c04a Mon Sep 17 00:00:00 2001 From: vladislavbelov Date: Fri, 10 Dec 2021 21:29:40 +0000 Subject: [PATCH] Resolves concerns from e4907bdb6e. Fixes #6395 Tested By: Langbart, nwtour Differential Revision: https://code.wildfiregames.com/D4370 This was SVN commit r26051. --- source/ps/VideoMode.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/ps/VideoMode.cpp b/source/ps/VideoMode.cpp index 9a4adea4ef..36cdeb7673 100644 --- a/source/ps/VideoMode.cpp +++ b/source/ps/VideoMode.cpp @@ -428,7 +428,12 @@ bool CVideoMode::InitSDL() SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); #else + // Some macOS and MESA drivers might not create a context even if they can + // with the core profile. So disable it for a while until we can guarantee + // its creation. +#if OS_WIN SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); +#endif SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); #endif