summaryrefslogtreecommitdiffstats
path: root/src/extras/postfx.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-11-22 00:12:34 +0100
committerGitHub <noreply@github.com>2020-11-22 00:12:34 +0100
commit15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7 (patch)
tree792d26a13fb9bc1caff0012ec4ec7ba0f8f8e842 /src/extras/postfx.cpp
parentno script logging (diff)
parentneo screen droplets (diff)
downloadre3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.gz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.bz2
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.lz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.xz
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.tar.zst
re3-15ae9e2a3e58837f355b6f428db1dd1ddcf94ec7.zip
Diffstat (limited to 'src/extras/postfx.cpp')
-rw-r--r--src/extras/postfx.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/extras/postfx.cpp b/src/extras/postfx.cpp
index fe481658..d3b8b8ac 100644
--- a/src/extras/postfx.cpp
+++ b/src/extras/postfx.cpp
@@ -364,6 +364,14 @@ CPostFX::NeedFrontBuffer(int32 type)
}
void
+CPostFX::GetBackBuffer(RwCamera *cam)
+{
+ RwRasterPushContext(pBackBuffer);
+ RwRasterRenderFast(RwCameraGetRaster(cam), 0, 0);
+ RwRasterPopContext();
+}
+
+void
CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blur, int32 type, uint32 bluralpha)
{
switch(type)
@@ -405,11 +413,8 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu
assert(pFrontBuffer);
assert(pBackBuffer);
- if(NeedBackBuffer()){
- RwRasterPushContext(pBackBuffer);
- RwRasterRenderFast(RwCameraGetRaster(cam), 0, 0);
- RwRasterPopContext();
- }
+ if(NeedBackBuffer())
+ GetBackBuffer(cam);
DefinedState();