Commit ef8a634c authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

Clear should not be affected by write masks.

parent 7370f601
...@@ -1363,6 +1363,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count ...@@ -1363,6 +1363,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
glClearStencil(Stencil); glClearStencil(Stencil);
checkGLcall("glClearStencil"); checkGLcall("glClearStencil");
glMask = glMask | GL_STENCIL_BUFFER_BIT; glMask = glMask | GL_STENCIL_BUFFER_BIT;
glStencilMask(0xFFFFFFFF);
} }
if (Flags & D3DCLEAR_ZBUFFER) { if (Flags & D3DCLEAR_ZBUFFER) {
...@@ -1419,6 +1420,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count ...@@ -1419,6 +1420,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count
/* Restore the old values (why..?) */ /* Restore the old values (why..?) */
if (Flags & D3DCLEAR_STENCIL) { if (Flags & D3DCLEAR_STENCIL) {
glClearStencil(old_stencil_clear_value); glClearStencil(old_stencil_clear_value);
glStencilMask(This->StateBlock->renderstate[D3DRS_STENCILWRITEMASK]);
} }
if (Flags & D3DCLEAR_ZBUFFER) { if (Flags & D3DCLEAR_ZBUFFER) {
glDepthMask(old_ztest); glDepthMask(old_ztest);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment