From ef8a634cb452c40e699dcd8ed2fd1b14da2e14d0 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Fri, 31 Oct 2003 03:35:43 +0000 Subject: [PATCH] Clear should not be affected by write masks. --- dlls/d3d8/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 72b754112b6..721e46694a6 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1363,6 +1363,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count glClearStencil(Stencil); checkGLcall("glClearStencil"); glMask = glMask | GL_STENCIL_BUFFER_BIT; + glStencilMask(0xFFFFFFFF); } if (Flags & D3DCLEAR_ZBUFFER) { @@ -1419,6 +1420,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count /* Restore the old values (why..?) */ if (Flags & D3DCLEAR_STENCIL) { glClearStencil(old_stencil_clear_value); + glStencilMask(This->StateBlock->renderstate[D3DRS_STENCILWRITEMASK]); } if (Flags & D3DCLEAR_ZBUFFER) { glDepthMask(old_ztest);