Skip to content
Snippets Groups Projects
Commit c922278b authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard
Browse files

Culling to different viewports failed as clearing the whole viewport

cleared the screen.
parent 03711317
No related branches found
No related tags found
No related merge requests found
......@@ -1349,6 +1349,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
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 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
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) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment