mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-10-31 23:15:54 +00:00
d3d9 debug render groups
This commit is contained in:
parent
e8b435a624
commit
253021866c
|
@ -1,8 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(RW_OPENGL)
|
#ifndef FINAL
|
||||||
#define PUSH_RENDERGROUP(str) glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, str)
|
// defined in RwHelpder.cpp
|
||||||
#define POP_RENDERGROUP() glPopDebugGroup()
|
void PushRendergroup(const char *name);
|
||||||
|
void PopRendergroup(void);
|
||||||
|
#define PUSH_RENDERGROUP(str) PushRendergroup(str)
|
||||||
|
#define POP_RENDERGROUP() PopRendergroup()
|
||||||
#else
|
#else
|
||||||
#define PUSH_RENDERGROUP(str)
|
#define PUSH_RENDERGROUP(str)
|
||||||
#define POP_RENDERGROUP()
|
#define POP_RENDERGROUP()
|
||||||
|
|
|
@ -113,6 +113,30 @@ SetCullMode(uint32 mode)
|
||||||
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
|
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*
|
RwFrame*
|
||||||
GetFirstFrameCallback(RwFrame *child, void *data)
|
GetFirstFrameCallback(RwFrame *child, void *data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue