Ivan Gyurdiev : wined3d: Add D3DZBUFFERTYPE to the WINED3D namespace.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 24 13:39:57 CDT 2006


Module: wine
Branch: master
Commit: 5f79e80827d9fe7d11d1036416f7c4f53d82459a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f79e80827d9fe7d11d1036416f7c4f53d82459a

Author: Ivan Gyurdiev <ivg231 at gmail.com>
Date:   Tue Oct 24 06:06:19 2006 -0400

wined3d: Add D3DZBUFFERTYPE to the WINED3D namespace.

---

 dlls/wined3d/device.c        |   10 +++++-----
 dlls/wined3d/stateblock.c    |    4 ++--
 dlls/wined3d/surface.c       |    4 ++--
 include/wine/wined3d_types.h |    8 ++++++++
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e4a4253..d82bf4e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3452,22 +3452,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         break;
 
     case WINED3DRS_ZENABLE                   :
-        switch ((D3DZBUFFERTYPE) Value) {
-        case D3DZB_FALSE:
+        switch ((WINED3DZBUFFERTYPE) Value) {
+        case WINED3DZB_FALSE:
             glDisable(GL_DEPTH_TEST);
             checkGLcall("glDisable GL_DEPTH_TEST");
             break;
-        case D3DZB_TRUE:
+        case WINED3DZB_TRUE:
             glEnable(GL_DEPTH_TEST);
             checkGLcall("glEnable GL_DEPTH_TEST");
             break;
-        case D3DZB_USEW:
+        case WINED3DZB_USEW:
             glEnable(GL_DEPTH_TEST);
             checkGLcall("glEnable GL_DEPTH_TEST");
             FIXME("W buffer is not well handled\n");
             break;
         default:
-            FIXME("Unrecognized D3DZBUFFERTYPE value %d\n", Value);
+            FIXME("Unrecognized WINED3DZBUFFERTYPE value %d\n", Value);
         }
         break;
 
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 2503c83..084b43d 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -839,9 +839,9 @@ static HRESULT  WINAPI IWineD3DStateBloc
     TRACE("Render states\n");
     /* Render states: */
     if (ThisDevice->depthStencilBuffer != NULL) {
-       IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE,       D3DZB_TRUE);
+       IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE,       WINED3DZB_TRUE);
     } else {
-       IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE,       D3DZB_FALSE);
+       IWineD3DDevice_SetRenderState(device, WINED3DRS_ZENABLE,       WINED3DZB_FALSE);
     }
     IWineD3DDevice_SetRenderState(device, WINED3DRS_FILLMODE,         D3DFILL_SOLID);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_SHADEMODE,        D3DSHADE_GOURAUD);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7a3fcb2..365d047 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1224,8 +1224,8 @@ static HRESULT WINAPI IWineD3DSurfaceImp
                 glDrawBuffer(GL_BACK);
                 vcheckGLcall("glDrawBuffer");
             }
-            if(myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == D3DZB_TRUE ||
-               myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == D3DZB_USEW) glEnable(GL_DEPTH_TEST);
+            if(myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == WINED3DZB_TRUE ||
+               myDevice->stateBlock->renderState[WINED3DRS_ZENABLE] == WINED3DZB_USEW) glEnable(GL_DEPTH_TEST);
             if (myDevice->stateBlock->renderState[WINED3DRS_ALPHABLENDENABLE]) glEnable(GL_BLEND);
             if (myDevice->stateBlock->renderState[WINED3DRS_FOGENABLE]) glEnable(GL_FOG);
 
diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h
index 24d5756..067188a 100644
--- a/include/wine/wined3d_types.h
+++ b/include/wine/wined3d_types.h
@@ -470,6 +470,14 @@ typedef enum _WINED3DVERTEXBLENDFLAGS {
     WINED3DVBF_0WEIGHTS = 256
 } WINED3DVERTEXBLENDFLAGS;
 
+typedef enum _WINED3DZBUFFERTYPE {
+    WINED3DZB_FALSE                 = 0,
+    WINED3DZB_TRUE                  = 1,
+    WINED3DZB_USEW                  = 2,
+
+    WINED3DZB_FORCE_DWORD           = 0x7fffffff
+} WINED3DZBUFFERTYPE;
+
 typedef struct _WINED3DDISPLAYMODE {
     UINT            Width;
     UINT            Height;




More information about the wine-cvs mailing list