summaryrefslogtreecommitdiffstats
path: root/src/rw
diff options
context:
space:
mode:
Diffstat (limited to 'src/rw')
-rw-r--r--src/rw/RwHelper.cpp5
-rw-r--r--src/rw/RwHelper.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 76749cb1..ef2d1c0f 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -11,6 +11,7 @@
#endif
#ifndef FINAL
RtCharset *debugCharset;
+bool bDebugRenderGroups;
#endif
#ifdef PS2_ALPHA_TEST
@@ -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)
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 1a5f64b1..0e04aece 100644
--- a/src/rw/RwHelper.h
+++ b/src/rw/RwHelper.h
@@ -1,5 +1,6 @@
#pragma once
+extern bool bDebugRenderGroups;
extern bool gPS2alphaTest;
void OpenCharsetSafe();