1
0
forked from 0ad/0ad

Adds debug context option for GL context creation.

This was SVN commit r26484.
This commit is contained in:
Vladislav Belov 2022-02-25 16:26:56 +00:00
parent 1a6c1c2131
commit 0d2faa1cab
2 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,7 @@ cursorbackend = "sdl"
rendererbackend = "gl"
; Enables additional debug information in renderer backend.
renderer.backend.debugcontext = "false"
renderer.backend.debugmessages = "false"
renderer.backend.debuglabels = "false"
renderer.backend.debugscopedlabels = "false"

View File

@ -407,6 +407,11 @@ bool CVideoMode::InitSDL()
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
bool debugContext = false;
CFG_GET_VAL("renderer.backend.debugcontext", debugContext);
if (debugContext)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
bool forceGLVersion = false;
CFG_GET_VAL("forceglversion", forceGLVersion);
if (forceGLVersion)