Culling to different viewports failed as clearing the whole viewport
cleared the screen.
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 019eaf5..75f3b41 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1349,6 +1349,8 @@
Count, pRects, Flags, Z, Stencil);
ENTER_GL();
+ glEnable(GL_SCISSOR_TEST);
+ checkGLcall("glEnable GL_SCISSOR_TEST");
if (Count > 0 && pRects) {
glEnable(GL_SCISSOR_TEST);
checkGLcall("glEnable GL_SCISSOR_TEST");
@@ -1397,6 +1399,12 @@
glScissor(curRect->x1, (This->PresentParms.BackBufferHeight - curRect->y2),
curRect->x2 - curRect->x1, curRect->y2 - curRect->y1);
checkGLcall("glScissor");
+ } else {
+ glScissor(This->StateBlock->viewport.X,
+ (This->PresentParms.BackBufferHeight - (This->StateBlock->viewport.Y + This->StateBlock->viewport.Height)),
+ This->StateBlock->viewport.Width,
+ This->StateBlock->viewport.Height);
+ checkGLcall("glScissor");
}
/* Clear the selected rectangle (or full screen) */