Commit b79dc388 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DVERTEXBLENDFLAGS typedef.

parent 0feb72f0
...@@ -3780,10 +3780,11 @@ static void transform_worldex(struct wined3d_context *context, const struct wine ...@@ -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) 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; 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); if (!once++) FIXME("Vertex blend flags %#x not supported.\n", f);
else WARN("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 ...@@ -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) 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; struct wined3d_device *device = context->swapchain->device;
const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_gl_info *gl_info = context->gl_info;
static unsigned int once; static unsigned int once;
switch(val) { switch (val)
case WINED3DVBF_1WEIGHTS: {
case WINED3DVBF_2WEIGHTS: case WINED3D_VBF_1WEIGHTS:
case WINED3DVBF_3WEIGHTS: case WINED3D_VBF_2WEIGHTS:
case WINED3D_VBF_3WEIGHTS:
glEnable(GL_VERTEX_BLEND_ARB); glEnable(GL_VERTEX_BLEND_ARB);
checkGLcall("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 ...@@ -3820,12 +3822,12 @@ static void state_vertexblend(struct wined3d_context *context, const struct wine
} }
break; break;
case WINED3DVBF_TWEENING: case WINED3D_VBF_TWEENING:
case WINED3DVBF_0WEIGHTS: /* Indexed vertex blending, not supported. */ case WINED3D_VBF_0WEIGHTS: /* Indexed vertex blending, not supported. */
if (!once++) FIXME("Vertex blend flags %#x not supported.\n", val); if (!once++) FIXME("Vertex blend flags %#x not supported.\n", val);
else WARN("Vertex blend flags %#x not supported.\n", val); else WARN("Vertex blend flags %#x not supported.\n", val);
/* Fall through. */ /* Fall through. */
case WINED3DVBF_DISABLE: case WINED3D_VBF_DISABLE:
glDisable(GL_VERTEX_BLEND_ARB); glDisable(GL_VERTEX_BLEND_ARB);
checkGLcall("glDisable(GL_VERTEX_BLEND_ARB)"); checkGLcall("glDisable(GL_VERTEX_BLEND_ARB)");
break; break;
......
...@@ -1180,7 +1180,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) ...@@ -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_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2;
state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL; state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL;
state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = 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_CLIPPLANEENABLE] = 0;
state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE; state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE;
tmpfloat.f = 1.0f; tmpfloat.f = 1.0f;
......
...@@ -411,15 +411,15 @@ enum wined3d_blend_op ...@@ -411,15 +411,15 @@ enum wined3d_blend_op
WINED3D_BLEND_OP_MAX = 5, WINED3D_BLEND_OP_MAX = 5,
}; };
typedef enum _WINED3DVERTEXBLENDFLAGS enum wined3d_vertex_blend_flags
{ {
WINED3DVBF_DISABLE = 0, WINED3D_VBF_DISABLE = 0,
WINED3DVBF_1WEIGHTS = 1, WINED3D_VBF_1WEIGHTS = 1,
WINED3DVBF_2WEIGHTS = 2, WINED3D_VBF_2WEIGHTS = 2,
WINED3DVBF_3WEIGHTS = 3, WINED3D_VBF_3WEIGHTS = 3,
WINED3DVBF_TWEENING = 255, WINED3D_VBF_TWEENING = 255,
WINED3DVBF_0WEIGHTS = 256 WINED3D_VBF_0WEIGHTS = 256,
} WINED3DVERTEXBLENDFLAGS; };
typedef enum _WINED3DCMPFUNC typedef enum _WINED3DCMPFUNC
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment