mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-12 21:22:14 +00:00
Reject OpenGL contexts w/ software renderer when core context requested.
This commit is contained in:
parent
59b1262b82
commit
2955f8dadb
1 changed files with 16 additions and 1 deletions
|
@ -499,7 +499,22 @@ static int GLimp_SetMode(int mode, qboolean fullscreen, qboolean noborder, qbool
|
|||
}
|
||||
else
|
||||
{
|
||||
ri.Printf(PRINT_ALL, "SDL_GL_CreateContext succeeded, but: %s\n", SDL_GetError());
|
||||
const char *renderer;
|
||||
|
||||
ri.Printf(PRINT_ALL, "SDL_GL_CreateContext succeeded.\n");
|
||||
|
||||
renderer = (const char *)qglGetString(GL_RENDERER);
|
||||
if (renderer && (strstr(renderer, "Software Renderer") || strstr(renderer, "Software Rasterizer")))
|
||||
{
|
||||
ri.Printf(PRINT_ALL, "GL_RENDERER is %s, rejecting context\n", renderer);
|
||||
|
||||
SDL_GL_DeleteContext(SDL_glContext);
|
||||
SDL_glContext = NULL;
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, profileMask);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, majorVersion);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minorVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue