Commit 732a14ae authored by bitplane's avatar bitplane

fixed a bug where opengl scissor tests were not disabled after drawing 2d...

fixed a bug where opengl scissor tests were not disabled after drawing 2d images with an invalid clipping rectangle.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@796 dfc29bdd-3216-0410-991c-e03cc46cb475
parent a22e4abf
......@@ -815,6 +815,9 @@ void COpenGLDriver::draw2DImage(video::ITexture* texture,
glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
if (clipRect)
{
if (!clipRect->isValid())
return;
glEnable(GL_SCISSOR_TEST);
glScissor(clipRect->UpperLeftCorner.X,renderTargetSize.Height-clipRect->LowerRightCorner.Y,
clipRect->getWidth(),clipRect->getHeight());
......@@ -913,6 +916,9 @@ void COpenGLDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>&
if (clipRect)
{
if (!clipRect->isValid())
return;
glEnable(GL_SCISSOR_TEST);
glScissor(clipRect->UpperLeftCorner.X,renderTargetSize.Height-clipRect->LowerRightCorner.Y,
clipRect->getWidth(),clipRect->getHeight());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment