Merge pull request #3324 from raven02/patch-10

Scisscor small fix
This commit is contained in:
Henrik Rydgård 2013-08-22 07:45:45 -07:00
commit 1330d5c242

View File

@ -328,21 +328,21 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
// Scissor
int scissorX1 = gstate.getScissorX1();
int scissorY1 = gstate.getScissorY1();
int scissorX2 = gstate.getScissorX2();
int scissorY2 = gstate.getScissorY2();
int scissorX2 = gstate.getScissorX2() + 1;
int scissorY2 = gstate.getScissorY2() + 1;
// This is a bit of a hack as the render buffer isn't always that size
if (scissorX1 == 0 && scissorY1 == 0
&& scissorX2 >= (int) (gstate_c.curRTWidth - 1)
&& scissorY2 >= (int) (gstate_c.curRTHeight - 1)) {
&& scissorX2 >= (int) gstate_c.curRTWidth
&& scissorY2 >= (int) gstate_c.curRTHeight) {
glstate.scissorTest.disable();
} else {
glstate.scissorTest.enable();
glstate.scissorRect.set(
renderX + scissorX1 * renderWidthFactor,
renderY + renderHeight - (scissorY2 * renderHeightFactor),
(scissorX2 - scissorX1 + 1) * renderWidthFactor,
(scissorY2 - scissorY1 + 1) * renderHeightFactor);
(scissorX2 - scissorX1) * renderWidthFactor,
(scissorY2 - scissorY1) * renderHeightFactor);
}
/*