summaryrefslogtreecommitdiffstats
path: root/src/rw
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-02-18 13:08:22 +0100
committeraap <aap@papnet.eu>2021-02-18 13:08:22 +0100
commit253021866c266d8cf8d18241d3c3f330bff9ed06 (patch)
tree3f46d73faeab388a4e93553ce4ac0aecf14e2a25 /src/rw
parentfix last commit (diff)
downloadre3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar.gz
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar.bz2
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar.lz
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar.xz
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.tar.zst
re3-253021866c266d8cf8d18241d3c3f330bff9ed06.zip
Diffstat (limited to '')
-rw-r--r--src/rw/RwHelper.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 65e342ed..e98b58f6 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -113,6 +113,30 @@ SetCullMode(uint32 mode)
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
}
+#ifndef FINAL
+void
+PushRendergroup(const char *name)
+{
+#if defined(RW_OPENGL)
+ 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)
+ glPopDebugGroup();
+#elif defined(RW_D3D9)
+ D3DPERF_EndEvent();
+#endif
+}
+#endif
+
RwFrame*
GetFirstFrameCallback(RwFrame *child, void *data)
{