Skip to content

Commit

Permalink
Add -glmarkers command-line option
Browse files Browse the repository at this point in the history
that only enables drawcall markers, without any debug output
(as opposed to -gldebug, which enables both)
  • Loading branch information
andrei-drexler committed Jul 30, 2024
1 parent 20f0934 commit d25ee83
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Quake/gl_vidsdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,10 @@ static qboolean GL_FindExtension (const char *name)
GL_BeginGroup
=============
*/
static qboolean gldebug = false;
static qboolean glmarkers = false;
void GL_BeginGroup (const char *name)
{
if (gldebug)
if (glmarkers)
GL_PushDebugGroupFunc (GL_DEBUG_SOURCE_APPLICATION, 0, -1, name);
}

Expand All @@ -897,7 +897,7 @@ GL_EndGroup
*/
void GL_EndGroup (void)
{
if (gldebug)
if (glmarkers)
GL_PopDebugGroupFunc ();
}

Expand Down Expand Up @@ -999,11 +999,14 @@ static void GL_CheckExtensions (void)
{
GL_InitFunctions (gl_core_functions, true);

if (COM_CheckParm ("-glmarkers"))
glmarkers = true;

#ifdef NDEBUG
if (COM_CheckParm("-gldebug"))
#endif
{
gldebug = true;
glmarkers = true;
GL_DebugMessageCallbackFunc (&GL_DebugCallback, NULL);
glEnable (GL_DEBUG_OUTPUT);
glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
Expand Down

0 comments on commit d25ee83

Please sign in to comment.