Stefan Dösinger : wined3d: Set the stencil mask for both faces.
Alexandre Julliard
julliard at winehq.org
Wed Sep 19 08:16:15 CDT 2007
Module: wine
Branch: master
Commit: 703ec4cbc4ac7542ff06f778e05c42aed909e2e8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=703ec4cbc4ac7542ff06f778e05c42aed909e2e8
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Fri Sep 14 11:57:07 2007 +0200
wined3d: Set the stencil mask for both faces.
---
dlls/wined3d/state.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index b248d00..0900243 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -707,10 +707,24 @@ state_stencil(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *c
}
static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+ DWORD mask;
+
if(stateblock->wineD3DDevice->stencilBufferTarget) {
- glStencilMask(stateblock->renderState[WINED3DRS_STENCILWRITEMASK]);
+ mask = stateblock->renderState[WINED3DRS_STENCILWRITEMASK];
+ } else {
+ mask = 0;
+ }
+
+ if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) {
+ GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
+ checkGLcall("glActiveStencilFaceEXT(GL_BACK)");
+ glStencilMask(mask);
+ checkGLcall("glStencilMask");
+ GL_EXTCALL(glActiveStencilFaceEXT(GL_FRONT));
+ checkGLcall("glActiveStencilFaceEXT(GL_FRONT)");
+ glStencilMask(mask);
} else {
- glStencilMask(0);
+ glStencilMask(mask);
}
checkGLcall("glStencilMask");
}
More information about the wine-cvs
mailing list