Ivan Gyurdiev : wined3d: Add D3DCMPFUNC to the WINED3D namespace.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 30 05:22:43 CST 2006
Module: wine
Branch: master
Commit: 206d248e4864f5ece30ea9295e0639959f5905dc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=206d248e4864f5ece30ea9295e0639959f5905dc
Author: Ivan Gyurdiev <ivg231 at gmail.com>
Date: Sun Oct 29 21:44:58 2006 -0500
wined3d: Add D3DCMPFUNC to the WINED3D namespace.
---
dlls/wined3d/stateblock.c | 8 ++++----
dlls/wined3d/utils.c | 20 ++++++++++----------
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 15d8cce..3038905 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -854,8 +854,8 @@ static HRESULT WINAPI IWineD3DStateBloc
IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLEND, WINED3DBLEND_ONE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLEND, WINED3DBLEND_ZERO);
IWineD3DDevice_SetRenderState(device, WINED3DRS_CULLMODE, WINED3DCULL_CCW);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_ZFUNC, D3DCMP_LESSEQUAL);
- IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHAFUNC, D3DCMP_ALWAYS);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_ZFUNC, WINED3DCMP_LESSEQUAL);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHAFUNC, WINED3DCMP_ALWAYS);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHAREF, 0);
IWineD3DDevice_SetRenderState(device, WINED3DRS_DITHERENABLE, FALSE);
IWineD3DDevice_SetRenderState(device, WINED3DRS_ALPHABLENDENABLE, FALSE);
@@ -886,7 +886,7 @@ static HRESULT WINAPI IWineD3DStateBloc
*/
This->renderState[WINED3DRS_STENCILREF] = 0;
This->renderState[WINED3DRS_STENCILMASK] = 0xFFFFFFFF;
- IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFUNC, D3DCMP_ALWAYS);
+ IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILFUNC, WINED3DCMP_ALWAYS);
IWineD3DDevice_SetRenderState(device, WINED3DRS_STENCILWRITEMASK, 0xFFFFFFFF);
IWineD3DDevice_SetRenderState(device, WINED3DRS_TEXTUREFACTOR, 0xFFFFFFFF);
IWineD3DDevice_SetRenderState(device, WINED3DRS_WRAP0, 0);
@@ -957,7 +957,7 @@ static HRESULT WINAPI IWineD3DStateBloc
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_CCW_STENCILFUNC, WINED3DCMP_ALWAYS);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE1, 0x0000000F);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE2, 0x0000000F);
IWineD3DDevice_SetRenderState(device, WINED3DRS_COLORWRITEENABLE3, 0x0000000F);
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 3a29e9d..398f37d 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -666,17 +666,17 @@ GLenum StencilOp(DWORD op) {
}
GLenum CompareFunc(DWORD func) {
- switch ((D3DCMPFUNC)func) {
- case D3DCMP_NEVER : return GL_NEVER;
- case D3DCMP_LESS : return GL_LESS;
- case D3DCMP_EQUAL : return GL_EQUAL;
- case D3DCMP_LESSEQUAL : return GL_LEQUAL;
- case D3DCMP_GREATER : return GL_GREATER;
- case D3DCMP_NOTEQUAL : return GL_NOTEQUAL;
- case D3DCMP_GREATEREQUAL : return GL_GEQUAL;
- case D3DCMP_ALWAYS : return GL_ALWAYS;
+ switch ((WINED3DCMPFUNC)func) {
+ case WINED3DCMP_NEVER : return GL_NEVER;
+ case WINED3DCMP_LESS : return GL_LESS;
+ case WINED3DCMP_EQUAL : return GL_EQUAL;
+ case WINED3DCMP_LESSEQUAL : return GL_LEQUAL;
+ case WINED3DCMP_GREATER : return GL_GREATER;
+ case WINED3DCMP_NOTEQUAL : return GL_NOTEQUAL;
+ case WINED3DCMP_GREATEREQUAL : return GL_GEQUAL;
+ case WINED3DCMP_ALWAYS : return GL_ALWAYS;
default:
- FIXME("Unrecognized D3DCMPFUNC value %d\n", func);
+ FIXME("Unrecognized WINED3DCMPFUNC value %d\n", func);
return 0;
}
}
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h
index 59dfb4c..8b72a7b 100644
--- a/include/wine/wined3d_types.h
+++ b/include/wine/wined3d_types.h
@@ -480,6 +480,19 @@ typedef enum _WINED3DVERTEXBLENDFLAGS {
WINED3DVBF_0WEIGHTS = 256
} WINED3DVERTEXBLENDFLAGS;
+typedef enum _WINED3DCMPFUNC {
+ WINED3DCMP_NEVER = 1,
+ WINED3DCMP_LESS = 2,
+ WINED3DCMP_EQUAL = 3,
+ WINED3DCMP_LESSEQUAL = 4,
+ WINED3DCMP_GREATER = 5,
+ WINED3DCMP_NOTEQUAL = 6,
+ WINED3DCMP_GREATEREQUAL = 7,
+ WINED3DCMP_ALWAYS = 8,
+
+ WINED3DCMP_FORCE_DWORD = 0x7fffffff
+} WINED3DCMPFUNC;
+
typedef enum _WINED3DZBUFFERTYPE {
WINED3DZB_FALSE = 0,
WINED3DZB_TRUE = 1,
More information about the wine-cvs
mailing list