[dx91] stencil write masks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similar to dx90 but for stencil functions instead (I'd have merged them into one patch but didnt find this one in a sample until after I had submitted the last patch, sorry).

Changelog
Clear should not be affected by write masks
Jason
diff -u3 -x '*.o' dlls/d3d8/dx90/device.c dlls/d3d8/device.c
--- dlls/d3d8/dx90/device.c	2003-10-30 21:38:34.000000000 +0000
+++ dlls/d3d8/device.c	2003-10-30 22:20:40.000000000 +0000
@@ -1363,6 +1363,7 @@
         glClearStencil(Stencil);
         checkGLcall("glClearStencil");
         glMask = glMask | GL_STENCIL_BUFFER_BIT;
+        glStencilMask(0xFFFFFFFF);
     }
 
     if (Flags & D3DCLEAR_ZBUFFER) {
@@ -1419,6 +1420,7 @@
     /* 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);


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux