wined3d: Disable two-sided stencil when doing stencil clears.

This commit is contained in:
Henri Verbeet 2010-03-25 09:32:35 +01:00 committed by Alexandre Julliard
parent 39b60870ff
commit 1c4e9e6a0e
1 changed files with 7 additions and 1 deletions

View File

@ -4390,7 +4390,13 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
ENTER_GL();
/* Only set the values up once, as they are not changing */
if (Flags & WINED3DCLEAR_STENCIL) {
if (Flags & WINED3DCLEAR_STENCIL)
{
if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE])
{
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
}
glClearStencil(Stencil);
checkGLcall("glClearStencil");
glMask = glMask | GL_STENCIL_BUFFER_BIT;