Module: wine Branch: master Commit: 02fb9f6f41ec5a05f854c2b55616e4432784f144 URL: http://source.winehq.org/git/wine.git/?a=commit;h=02fb9f6f41ec5a05f854c2b556...
Author: Ivan Gyurdiev ivg231@gmail.com Date: Sun Oct 29 21:43:18 2006 -0500
wined3d: Add D3DCULL to the WINED3D namespace.
---
dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/stateblock.c | 2 +- include/wine/wined3d_types.h | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index edd0760..7070d03 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3476,12 +3476,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl /* If we are culling "back faces with clockwise vertices" then set front faces to be counter clockwise and enable culling of back faces */ - switch ((D3DCULL) Value) { - case D3DCULL_NONE: + switch ((WINED3DCULL) Value) { + case WINED3DCULL_NONE: glDisable(GL_CULL_FACE); checkGLcall("glDisable GL_CULL_FACE"); break; - case D3DCULL_CW: + case WINED3DCULL_CW: glEnable(GL_CULL_FACE); checkGLcall("glEnable GL_CULL_FACE"); if (This->renderUpsideDown) { @@ -3493,7 +3493,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl } glCullFace(GL_BACK); break; - case D3DCULL_CCW: + case WINED3DCULL_CCW: glEnable(GL_CULL_FACE); checkGLcall("glEnable GL_CULL_FACE"); if (This->renderUpsideDown) { @@ -3506,7 +3506,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl glCullFace(GL_BACK); break; default: - FIXME("Unrecognized/Unhandled D3DCULL value %d\n", Value); + FIXME("Unrecognized/Unhandled WINED3DCULL value %d\n", Value); } break;
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index b8ba379..c28a24f 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -853,7 +853,7 @@ static HRESULT WINAPI IWineD3DStateBloc IWineD3DDevice_SetRenderState(device, WINED3DRS_LASTPIXEL, TRUE); IWineD3DDevice_SetRenderState(device, WINED3DRS_SRCBLEND, WINED3DBLEND_ONE); IWineD3DDevice_SetRenderState(device, WINED3DRS_DESTBLEND, WINED3DBLEND_ZERO); - IWineD3DDevice_SetRenderState(device, WINED3DRS_CULLMODE, D3DCULL_CCW); + 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_ALPHAREF, 0); diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index a72b24a..c703c8b 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -505,6 +505,14 @@ typedef enum _WINED3DSHADEMODE { WINED3DSHADE_FORCE_DWORD = 0x7fffffff } WINED3DSHADEMODE;
+typedef enum _WINED3DCULL { + WINED3DCULL_NONE = 1, + WINED3DCULL_CW = 2, + WINED3DCULL_CCW = 3, + + WINED3DCULL_FORCE_DWORD = 0x7fffffff +} WINED3DCULL; + typedef struct _WINED3DDISPLAYMODE { UINT Width; UINT Height;