summaryrefslogtreecommitdiffstats
path: root/src/rw/RwHelper.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-19 00:30:02 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-19 00:30:02 +0100
commitdfa0c8bf1921d955f1ea5af6388a381b280fcd98 (patch)
tree639af8a47ae411af564387c5cf1f700b9495390d /src/rw/RwHelper.cpp
parentGet keyboard input from X11 on Linux (diff)
parentname error strings to REVC (diff)
downloadre3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar.gz
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar.bz2
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar.lz
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar.xz
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.tar.zst
re3-dfa0c8bf1921d955f1ea5af6388a381b280fcd98.zip
Diffstat (limited to 'src/rw/RwHelper.cpp')
-rw-r--r--src/rw/RwHelper.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 609dd79b..11fde99d 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -102,6 +102,32 @@ SetCullMode(uint32 mode)
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
}
+#ifndef FINAL
+void
+PushRendergroup(const char *name)
+{
+#if defined(RW_OPENGL)
+ 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));
+ D3DPERF_BeginEvent(0xFFFFFFFF, tmp);
+#endif
+}
+
+void
+PopRendergroup(void)
+{
+#if defined(RW_OPENGL)
+ if(GLAD_GL_KHR_debug)
+ glPopDebugGroup();
+#elif defined(RW_D3D9)
+ D3DPERF_EndEvent();
+#endif
+}
+#endif
+
RwFrame*
GetFirstFrameCallback(RwFrame *child, void *data)
{