wined3d: Get rid of the WINED3DZBUFFERTYPE typedef.

This commit is contained in:
Henri Verbeet 2011-12-21 21:34:59 +01:00 committed by Alexandre Julliard
parent 654d53fa5f
commit 00096c82fd
5 changed files with 23 additions and 25 deletions

View file

@ -329,7 +329,7 @@ extern const GUID IID_D3DDEVICE_WineD3D DECLSPEC_HIDDEN;
/* Helper functions */
HRESULT IDirect3DImpl_GetCaps(const struct wined3d *wined3d,
D3DDEVICEDESC *Desc123, D3DDEVICEDESC7 *Desc7) DECLSPEC_HIDDEN;
WINED3DZBUFFERTYPE IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This) DECLSPEC_HIDDEN;
enum wined3d_depth_buffer_type IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *device) DECLSPEC_HIDDEN;
static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice(IDirect3DDevice *iface)
{

View file

@ -6933,8 +6933,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface)
* The depth stencil state to set if creating the device
*
*****************************************************************************/
WINED3DZBUFFERTYPE
IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
enum wined3d_depth_buffer_type IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
{
IDirectDrawSurface7 *depthStencil = NULL;
IDirectDrawSurfaceImpl *dsi;
@ -6945,7 +6944,7 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
{
TRACE("Setting wined3d depth stencil to NULL\n");
wined3d_device_set_depth_stencil(This->wined3d_device, NULL);
return WINED3DZB_FALSE;
return WINED3D_ZB_FALSE;
}
dsi = impl_from_IDirectDrawSurface7(depthStencil);
@ -6953,7 +6952,7 @@ IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *This)
wined3d_device_set_depth_stencil(This->wined3d_device, dsi->wined3d_surface);
IDirectDrawSurface7_Release(depthStencil);
return WINED3DZB_TRUE;
return WINED3D_ZB_TRUE;
}
HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDirectDrawSurfaceImpl *target)

View file

@ -104,21 +104,21 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
switch (state->render_states[WINED3D_RS_ZENABLE])
{
case WINED3DZB_FALSE:
case WINED3D_ZB_FALSE:
glDisable(GL_DEPTH_TEST);
checkGLcall("glDisable GL_DEPTH_TEST");
break;
case WINED3DZB_TRUE:
case WINED3D_ZB_TRUE:
glEnable(GL_DEPTH_TEST);
checkGLcall("glEnable GL_DEPTH_TEST");
break;
case WINED3DZB_USEW:
case WINED3D_ZB_USEW:
glEnable(GL_DEPTH_TEST);
checkGLcall("glEnable GL_DEPTH_TEST");
FIXME("W buffer is not well handled\n");
break;
default:
FIXME("Unrecognized D3DZBUFFERTYPE value %#x.\n",
FIXME("Unrecognized depth buffer type %#x.\n",
state->render_states[WINED3D_RS_ZENABLE]);
}
}

View file

@ -1120,9 +1120,9 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
TRACE("Render states\n");
/* Render states: */
if (device->auto_depth_stencil)
state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_TRUE;
state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_TRUE;
else
state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_FALSE;
state->render_states[WINED3D_RS_ZENABLE] = WINED3D_ZB_FALSE;
state->render_states[WINED3D_RS_FILLMODE] = WINED3DFILL_SOLID;
state->render_states[WINED3D_RS_SHADEMODE] = WINED3DSHADE_GOURAUD;
lp.lp.repeat_factor = 0;

View file

@ -423,23 +423,22 @@ enum wined3d_vertex_blend_flags
enum wined3d_cmp_func
{
WINED3D_CMP_NEVER = 1,
WINED3D_CMP_LESS = 2,
WINED3D_CMP_EQUAL = 3,
WINED3D_CMP_LESSEQUAL = 4,
WINED3D_CMP_GREATER = 5,
WINED3D_CMP_NOTEQUAL = 6,
WINED3D_CMP_GREATEREQUAL = 7,
WINED3D_CMP_ALWAYS = 8,
WINED3D_CMP_NEVER = 1,
WINED3D_CMP_LESS = 2,
WINED3D_CMP_EQUAL = 3,
WINED3D_CMP_LESSEQUAL = 4,
WINED3D_CMP_GREATER = 5,
WINED3D_CMP_NOTEQUAL = 6,
WINED3D_CMP_GREATEREQUAL = 7,
WINED3D_CMP_ALWAYS = 8,
};
typedef enum _WINED3DZBUFFERTYPE
enum wined3d_depth_buffer_type
{
WINED3DZB_FALSE = 0,
WINED3DZB_TRUE = 1,
WINED3DZB_USEW = 2,
WINED3DZB_FORCE_DWORD = 0x7fffffff
} WINED3DZBUFFERTYPE;
WINED3D_ZB_FALSE = 0,
WINED3D_ZB_TRUE = 1,
WINED3D_ZB_USEW = 2,
};
typedef enum _WINED3DFOGMODE
{