aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COGLESDriver.cpp
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2021-06-21 14:16:38 -0700
committerGitHub <noreply@github.com>2021-06-21 23:16:38 +0200
commit78d1a3f73e55b84b612b8c9a38b50fd0063394f4 (patch)
tree608dace97aa5c6364764459ad705ece89ee6a8fb /source/Irrlicht/COGLESDriver.cpp
parentb43f9b96e0c2f9b07e597bc71e39c182e87fdc43 (diff)
downloadirrlicht-78d1a3f73e55b84b612b8c9a38b50fd0063394f4.tar.xz
Fix `getViewPort` returning incorrect results
Diffstat (limited to 'source/Irrlicht/COGLESDriver.cpp')
-rw-r--r--source/Irrlicht/COGLESDriver.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/Irrlicht/COGLESDriver.cpp b/source/Irrlicht/COGLESDriver.cpp
index cca937c..2bce88a 100644
--- a/source/Irrlicht/COGLESDriver.cpp
+++ b/source/Irrlicht/COGLESDriver.cpp
@@ -2330,6 +2330,13 @@ void COGLES1Driver::setViewPort(const core::rect<s32>& area)
}
+void COGLES1Driver::setViewPortRaw(u32 width, u32 height)
+{
+ CacheHandler->setViewport(0, 0, width, height);
+ ViewPort = core::recti(0, 0, width, height);
+}
+
+
//! Draws a shadow volume into the stencil buffer.
void COGLES1Driver::drawStencilShadowVolume(const core::array<core::vector3df>& triangles, bool zfail, u32 debugDataVisible)
{
@@ -2779,7 +2786,7 @@ bool COGLES1Driver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SCol
destRenderTargetSize = renderTarget->getSize();
- CacheHandler->setViewport(0, 0, destRenderTargetSize.Width, destRenderTargetSize.Height);
+ setViewPortRaw(destRenderTargetSize.Width, destRenderTargetSize.Height);
}
else
{
@@ -2805,7 +2812,7 @@ bool COGLES1Driver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SCol
destRenderTargetSize = core::dimension2d<u32>(0, 0);
- CacheHandler->setViewport(0, 0, ScreenSize.Width, ScreenSize.Height);
+ setViewPortRaw(ScreenSize.Width, ScreenSize.Height);
}
if (CurrentRenderTargetSize != destRenderTargetSize)