Added love.graphics.intersectScissor(x, y, w, h). Resolves issue #1071.

It sets the active scissor rectangle to the intersection of the existing scissor (if any) and the specified rectangle.
This commit is contained in:
Alex Szpakowski
2015-09-16 19:04:57 -03:00
parent 9c1214c77a
commit 00845c0ad0
7 changed files with 61 additions and 17 deletions
+3 -1
View File
@@ -126,6 +126,8 @@ public:
**/
void setScissor(int x, int y, int width, int height);
void intersectScissor(int x, int y, int width, int height);
/**
* Clears any scissor that has been created.
**/
@@ -478,7 +480,7 @@ private:
float pointSize = 1.0f;
bool scissor = false;
OpenGL::Viewport scissorBox = OpenGL::Viewport();
ScissorRect scissorRect = ScissorRect();
// Stencil.
bool stencilTest = false;