aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/COpenGLDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Irrlicht/COpenGLDriver.cpp')
-rw-r--r--source/Irrlicht/COpenGLDriver.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/Irrlicht/COpenGLDriver.cpp b/source/Irrlicht/COpenGLDriver.cpp
index cbbc61a..604bd7e 100644
--- a/source/Irrlicht/COpenGLDriver.cpp
+++ b/source/Irrlicht/COpenGLDriver.cpp
@@ -3240,6 +3240,13 @@ void COpenGLDriver::setViewPort(const core::rect<s32>& area)
}
+void COpenGLDriver::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. To draw a stencil shadow, do
//! this: First, draw all geometry. Then use this method, to draw the shadow
//! volume. Next use IVideoDriver::drawStencilShadow() to visualize the shadow.
@@ -3872,7 +3879,7 @@ bool COpenGLDriver::setRenderTargetEx(IRenderTarget* target, u16 clearFlag, SCol
destRenderTargetSize = renderTarget->getSize();
- CacheHandler->setViewport(0, 0, destRenderTargetSize.Width, destRenderTargetSize.Height);
+ setViewPortRaw(destRenderTargetSize.Width, destRenderTargetSize.Height);
}
else
{
@@ -3898,7 +3905,7 @@ bool COpenGLDriver::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)
@@ -3972,7 +3979,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
if (format==video::ECF_UNKNOWN)
format=getColorFormat();
- // TODO: Maybe we could support more formats (floating point and some of those beyond ECF_R8), didn't really try yet
+ // TODO: Maybe we could support more formats (floating point and some of those beyond ECF_R8), didn't really try yet
if (IImage::isCompressedFormat(format) || IImage::isDepthFormat(format) || IImage::isFloatingPointFormat(format) || format >= ECF_R8)
return 0;