Browse Source

make debug render groups optional

master
aap 1 year ago
parent
commit
9a7fa47857
  1. 1
      src/core/re3.cpp
  2. 5
      src/rw/RwHelper.cpp
  3. 1
      src/rw/RwHelper.h

1
src/core/re3.cpp

@ -1001,6 +1001,7 @@ extern bool gbRenderWorld2; @@ -1001,6 +1001,7 @@ extern bool gbRenderWorld2;
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
#endif
#ifndef FINAL
DebugMenuAddVarBool8("Debug", "Use debug render groups", &bDebugRenderGroups, nil);
DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil);
#ifdef USE_CUSTOM_ALLOCATOR
DebugMenuAddCmd("Debug", "Parse Heap", ParseHeap);

5
src/rw/RwHelper.cpp

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#endif
#ifndef FINAL
RtCharset *debugCharset;
bool bDebugRenderGroups;
#endif
#ifdef PS2_ALPHA_TEST
@ -117,6 +118,8 @@ SetCullMode(uint32 mode) @@ -117,6 +118,8 @@ SetCullMode(uint32 mode)
void
PushRendergroup(const char *name)
{
if(!bDebugRenderGroups)
return;
#if defined(RW_OPENGL)
if(GLAD_GL_KHR_debug)
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name);
@ -130,6 +133,8 @@ PushRendergroup(const char *name) @@ -130,6 +133,8 @@ PushRendergroup(const char *name)
void
PopRendergroup(void)
{
if(!bDebugRenderGroups)
return;
#if defined(RW_OPENGL)
if(GLAD_GL_KHR_debug)
glPopDebugGroup();

1
src/rw/RwHelper.h

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#pragma once
extern bool bDebugRenderGroups;
extern bool gPS2alphaTest;
void OpenCharsetSafe();

Loading…
Cancel
Save