From c922278bfae5a534c31f354cc99b44ea2a919691 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Thu, 30 Oct 2003 23:05:09 +0000 Subject: [PATCH] Culling to different viewports failed as clearing the whole viewport cleared the screen. --- dlls/d3d8/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 019eaf505af..75f3b414668 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -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) */ -- 2.11.4.GIT