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
master
bitplane 2007-07-17 20:52:13 +00:00
parent a22e4abf94
commit 732a14ae70
1 changed files with 6 additions and 0 deletions

View File

@ -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());