Another SDL GL try

This commit is contained in:
def 2018-04-13 21:34:12 +02:00
parent 920597d48e
commit 666b1a9576

View file

@ -2210,6 +2210,9 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
//query default values, since they are platform dependend
static bool s_InitDefaultParams = false;
static int s_SDLGLContextProfileMask, s_SDLGLContextMajorVersion, s_SDLGLContextMinorVersion;
m_UseOpenGL3_3 = false;
if(g_Config.m_GfxOpenGL3)
{
if(!s_InitDefaultParams)
{
SDL_GL_GetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, &s_SDLGLContextProfileMask);
@ -2218,8 +2221,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
s_InitDefaultParams = true;
}
m_UseOpenGL3_3 = false;
if(g_Config.m_GfxOpenGL3 && SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE) == 0)
if(SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE) == 0)
{
pErr = SDL_GetError();
if(pErr[0] != '\0')
@ -2262,6 +2264,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, s_SDLGLContextMajorVersion);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, s_SDLGLContextMinorVersion);
}
}
// set screen
SDL_Rect ScreenPos;