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-e03cc46cb475master
parent
a22e4abf94
commit
732a14ae70
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue