summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-19 18:41:47 +0100
committeraap <aap@papnet.eu>2021-02-19 18:41:47 +0100
commitb88cf7b93990788a1b7cd9d4163bec7e60614716 (patch)
tree2b464d762856cea0c81ee3769fc0e67072966f7f
parentremove nightly (diff)
downloadre3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar.gz
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar.bz2
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar.lz
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar.xz
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.tar.zst
re3-b88cf7b93990788a1b7cd9d4163bec7e60614716.zip
Diffstat (limited to '')
-rw-r--r--src/core/re3.cpp1
-rw-r--r--src/rw/RwHelper.cpp5
-rw-r--r--src/rw/RwHelper.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 3f99b793..0ce7f834 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -1072,6 +1072,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);
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 11fde99d..9b0ba137 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -9,6 +9,7 @@
#endif
#ifndef FINAL
RtCharset *debugCharset;
+bool bDebugRenderGroups;
#endif
#ifdef PS2_ALPHA_TEST
@@ -106,6 +107,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);
@@ -119,6 +122,8 @@ PushRendergroup(const char *name)
void
PopRendergroup(void)
{
+ if(!bDebugRenderGroups)
+ return;
#if defined(RW_OPENGL)
if(GLAD_GL_KHR_debug)
glPopDebugGroup();
diff --git a/src/rw/RwHelper.h b/src/rw/RwHelper.h
index 9352d1fd..a3a1928c 100644
--- a/src/rw/RwHelper.h
+++ b/src/rw/RwHelper.h
@@ -1,5 +1,6 @@
#pragma once
+extern bool bDebugRenderGroups;
extern bool gPS2alphaTest;
extern bool gBackfaceCulling;