From b88cf7b93990788a1b7cd9d4163bec7e60614716 Mon Sep 17 00:00:00 2001 From: aap Date: Fri, 19 Feb 2021 18:41:47 +0100 Subject: make debug render groups optional --- src/rw/RwHelper.cpp | 5 +++++ src/rw/RwHelper.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src/rw') 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; -- cgit v1.2.3