summaryrefslogtreecommitdiffstats
path: root/src/rw/RwHelper.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-18 20:31:53 +0100
committeraap <aap@papnet.eu>2021-02-18 20:31:53 +0100
commit11bc8ea6022e430a47ba1040925dde50091d75c4 (patch)
tree5d6c121d70332edcf1acfa03571bb413b3fb29eb /src/rw/RwHelper.cpp
parentd3d9 debug render groups (diff)
downloadre3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar.gz
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar.bz2
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar.lz
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar.xz
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.tar.zst
re3-11bc8ea6022e430a47ba1040925dde50091d75c4.zip
Diffstat (limited to '')
-rw-r--r--src/rw/RwHelper.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 35617808..11fde99d 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -107,7 +107,8 @@ void
PushRendergroup(const char *name)
{
#if defined(RW_OPENGL)
- glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name);
+ if(GLAD_GL_KHR_debug)
+ glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name);
#elif defined(RW_D3D9)
static WCHAR tmp[256];
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, tmp, sizeof(tmp));
@@ -119,7 +120,8 @@ void
PopRendergroup(void)
{
#if defined(RW_OPENGL)
- glPopDebugGroup();
+ if(GLAD_GL_KHR_debug)
+ glPopDebugGroup();
#elif defined(RW_D3D9)
D3DPERF_EndEvent();
#endif