summaryrefslogtreecommitdiffstats
path: root/src/rw/RwHelper.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-06-25 09:15:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-06-25 09:15:19 +0200
commit8a5afd0db2fa2616556ed953c5c464c6930d6f47 (patch)
tree0747c8742ffb38488e7d3569d92ff5ba1c3a5e39 /src/rw/RwHelper.cpp
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
parentMerge remote-tracking branch 'origin/miami' into lcs (diff)
downloadre3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.gz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.bz2
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.lz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.xz
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.tar.zst
re3-8a5afd0db2fa2616556ed953c5c464c6930d6f47.zip
Diffstat (limited to 'src/rw/RwHelper.cpp')
-rw-r--r--src/rw/RwHelper.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 186ed870..6021b866 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -4,11 +4,13 @@
#include "Timecycle.h"
#include "skeleton.h"
#include "Debug.h"
+#include "MBlur.h"
#if !defined(FINAL) || defined(DEBUGMENU)
#include "rtcharse.h"
#endif
#ifndef FINAL
RtCharset *debugCharset;
+bool bDebugRenderGroups;
#endif
#ifdef PS2_ALPHA_TEST
@@ -102,6 +104,36 @@ SetCullMode(uint32 mode)
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
}
+#ifndef FINAL
+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);
+#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(!bDebugRenderGroups)
+ return;
+#if defined(RW_OPENGL)
+ if(GLAD_GL_KHR_debug)
+ glPopDebugGroup();
+#elif defined(RW_D3D9)
+ D3DPERF_EndEvent();
+#endif
+}
+#endif
+
RwFrame*
GetFirstFrameCallback(RwFrame *child, void *data)
{
@@ -549,6 +581,12 @@ CameraSize(RwCamera * camera, RwRect * rect,
raster->width = zRaster->width = rect->w;
raster->height = zRaster->height = rect->h;
#endif
+#ifdef FIX_BUGS
+ if(CMBlur::BlurOn){
+ CMBlur::MotionBlurClose();
+ CMBlur::MotionBlurOpen(camera);
+ }
+#endif
}
/* Figure out the view window */