Clear should not be affected by write masks.

This commit is contained in:
Jason Edmeades 2003-10-31 03:35:43 +00:00 committed by Alexandre Julliard
parent 7370f60120
commit ef8a634cb4
1 changed files with 2 additions and 0 deletions

View File

@ -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
/* 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);