Module: wine Branch: master Commit: b79dc388c318fdf56af979dcc86412fab3f7777c URL: http://source.winehq.org/git/wine.git/?a=commit;h=b79dc388c318fdf56af979dcc8...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Dec 20 21:42:13 2011 +0100
wined3d: Get rid of the WINED3DVERTEXBLENDFLAGS typedef.
---
dlls/wined3d/state.c | 22 ++++++++++++---------- dlls/wined3d/stateblock.c | 2 +- include/wine/wined3d.h | 16 ++++++++-------- 3 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 8727369..b03a4b8 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3780,10 +3780,11 @@ static void transform_worldex(struct wined3d_context *context, const struct wine
static void state_vertexblend_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - WINED3DVERTEXBLENDFLAGS f = state->render_states[WINED3D_RS_VERTEXBLEND]; + enum wined3d_vertex_blend_flags f = state->render_states[WINED3D_RS_VERTEXBLEND]; static unsigned int once;
- if (f == WINED3DVBF_DISABLE) return; + if (f == WINED3D_VBF_DISABLE) + return;
if (!once++) FIXME("Vertex blend flags %#x not supported.\n", f); else WARN("Vertex blend flags %#x not supported.\n", f); @@ -3791,15 +3792,16 @@ static void state_vertexblend_w(struct wined3d_context *context, const struct wi
static void state_vertexblend(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - WINED3DVERTEXBLENDFLAGS val = state->render_states[WINED3D_RS_VERTEXBLEND]; + enum wined3d_vertex_blend_flags val = state->render_states[WINED3D_RS_VERTEXBLEND]; struct wined3d_device *device = context->swapchain->device; const struct wined3d_gl_info *gl_info = context->gl_info; static unsigned int once;
- switch(val) { - case WINED3DVBF_1WEIGHTS: - case WINED3DVBF_2WEIGHTS: - case WINED3DVBF_3WEIGHTS: + switch (val) + { + case WINED3D_VBF_1WEIGHTS: + case WINED3D_VBF_2WEIGHTS: + case WINED3D_VBF_3WEIGHTS: glEnable(GL_VERTEX_BLEND_ARB); checkGLcall("glEnable(GL_VERTEX_BLEND_ARB)");
@@ -3820,12 +3822,12 @@ static void state_vertexblend(struct wined3d_context *context, const struct wine } break;
- case WINED3DVBF_TWEENING: - case WINED3DVBF_0WEIGHTS: /* Indexed vertex blending, not supported. */ + case WINED3D_VBF_TWEENING: + case WINED3D_VBF_0WEIGHTS: /* Indexed vertex blending, not supported. */ if (!once++) FIXME("Vertex blend flags %#x not supported.\n", val); else WARN("Vertex blend flags %#x not supported.\n", val); /* Fall through. */ - case WINED3DVBF_DISABLE: + case WINED3D_VBF_DISABLE: glDisable(GL_VERTEX_BLEND_ARB); checkGLcall("glDisable(GL_VERTEX_BLEND_ARB)"); break; diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index adea6bb..ea605c5 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1180,7 +1180,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2; state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL; state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3DMCS_MATERIAL; - state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3DVBF_DISABLE; + state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3D_VBF_DISABLE; state->render_states[WINED3D_RS_CLIPPLANEENABLE] = 0; state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE; tmpfloat.f = 1.0f; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 0bcbe08..2296d31 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -411,15 +411,15 @@ enum wined3d_blend_op WINED3D_BLEND_OP_MAX = 5, };
-typedef enum _WINED3DVERTEXBLENDFLAGS -{ - WINED3DVBF_DISABLE = 0, - WINED3DVBF_1WEIGHTS = 1, - WINED3DVBF_2WEIGHTS = 2, - WINED3DVBF_3WEIGHTS = 3, - WINED3DVBF_TWEENING = 255, - WINED3DVBF_0WEIGHTS = 256 -} WINED3DVERTEXBLENDFLAGS; +enum wined3d_vertex_blend_flags +{ + WINED3D_VBF_DISABLE = 0, + WINED3D_VBF_1WEIGHTS = 1, + WINED3D_VBF_2WEIGHTS = 2, + WINED3D_VBF_3WEIGHTS = 3, + WINED3D_VBF_TWEENING = 255, + WINED3D_VBF_0WEIGHTS = 256, +};
typedef enum _WINED3DCMPFUNC {