mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Another SDL GL try
This commit is contained in:
parent
920597d48e
commit
666b1a9576
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue