Ivan Gyurdiev : wined3d: Add D3DSTENCILOP to the WINED3D namespace.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 30 05:22:40 CST 2006
Module: wine
Branch: master
Commit: 2b6deb863729e09e370e627fe9277af166fcc4b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b6deb863729e09e370e627fe9277af166fcc4b8
Author: Ivan Gyurdiev <ivg231 at gmail.com>
Date: Sun Oct 29 21:44:22 2006 -0500
wined3d: Add D3DSTENCILOP to the WINED3D namespace.
---
dlls/wined3d/stateblock.c | 12 ++++++------
dlls/wined3d/utils.c | 16 ++++++++--------
include/wine/wined3d_types.h | 13 +++++++++++++
3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index bd3e8b4..15d8cce 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -874,9 +874,9 @@ static HRESULT WINAPI IWineD3DStateBloc
IWineD3DDevice_SetRenderState(device, WINED3DRS_ZBIAS, 0);
IWineD3DDevice_SetRenderState(device, WINED3DRS_RANGEFOGENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILENABLE, FALSE);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFAIL, D3DSTENCILOP_KEEP);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILPASS, D3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFAIL, WINED3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILZFAIL, WINED3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILPASS, WINED3DSTENCILOP_KEEP);
/* Setting stencil func also uses values for stencil ref/mask, so manually set defaults
* so only a single call performed (and ensure defaults initialized before making that call)
@@ -954,9 +954,9 @@ static HRESULT WINAPI IWineD3DStateBloc
IWineD3DDevice_SetRenderState(device, WINED3DRS_ADAPTIVETESS_W, tmpfloat.d);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ENABLEADAPTIVETESSELLATION, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_TWOSIDEDSTENCILMODE, FALSE);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFAIL, D3DSTENCILOP_KEEP);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILZFAIL, D3DSTENCILOP_KEEP);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILPASS, D3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFAIL, WINED3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILZFAIL, WINED3DSTENCILOP_KEEP);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILPASS, WINED3DSTENCILOP_KEEP);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CCW_STENCILFUNC, D3DCMP_ALWAYS);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE1, 0x0000000F);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE2, 0x0000000F);
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 1e2975e..3a29e9d 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -651,14 +651,14 @@ #undef POOL_TO_STR
*/
GLenum StencilOp(DWORD op) {
switch(op) {
- case D3DSTENCILOP_KEEP : return GL_KEEP;
- case D3DSTENCILOP_ZERO : return GL_ZERO;
- case D3DSTENCILOP_REPLACE : return GL_REPLACE;
- case D3DSTENCILOP_INCRSAT : return GL_INCR;
- case D3DSTENCILOP_DECRSAT : return GL_DECR;
- case D3DSTENCILOP_INVERT : return GL_INVERT;
- case D3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
- case D3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
+ case WINED3DSTENCILOP_KEEP : return GL_KEEP;
+ case WINED3DSTENCILOP_ZERO : return GL_ZERO;
+ case WINED3DSTENCILOP_REPLACE : return GL_REPLACE;
+ case WINED3DSTENCILOP_INCRSAT : return GL_INCR;
+ case WINED3DSTENCILOP_DECRSAT : return GL_DECR;
+ case WINED3DSTENCILOP_INVERT : return GL_INVERT;
+ case WINED3DSTENCILOP_INCR : return GL_INCR_WRAP_EXT;
+ case WINED3DSTENCILOP_DECR : return GL_DECR_WRAP_EXT;
default:
FIXME("Unrecognized stencil op %d\n", op);
return GL_KEEP;
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h
index 529b65a..59dfb4c 100644
--- a/include/wine/wined3d_types.h
+++ b/include/wine/wined3d_types.h
@@ -521,6 +521,19 @@ typedef enum _WINED3DCULL {
WINED3DCULL_FORCE_DWORD = 0x7fffffff
} WINED3DCULL;
+typedef enum _WINED3DSTENCILOP {
+ WINED3DSTENCILOP_KEEP = 1,
+ WINED3DSTENCILOP_ZERO = 2,
+ WINED3DSTENCILOP_REPLACE = 3,
+ WINED3DSTENCILOP_INCRSAT = 4,
+ WINED3DSTENCILOP_DECRSAT = 5,
+ WINED3DSTENCILOP_INVERT = 6,
+ WINED3DSTENCILOP_INCR = 7,
+ WINED3DSTENCILOP_DECR = 8,
+
+ WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff
+} WINED3DSTENCILOP;
+
typedef struct _WINED3DDISPLAYMODE {
UINT Width;
UINT Height;
More information about the wine-cvs
mailing list