wined3d: Get rid of the WINED3DBLENDOP typedef.

This commit is contained in:
Henri Verbeet 2011-12-19 15:16:53 +01:00 committed by Alexandre Julliard
parent b39125d2f0
commit 969f3be73f
3 changed files with 15 additions and 16 deletions

View File

@ -242,19 +242,19 @@ static void state_blendop_w(struct wined3d_context *context, const struct wined3
WARN("Unsupported in local OpenGL implementation: glBlendEquation\n"); WARN("Unsupported in local OpenGL implementation: glBlendEquation\n");
} }
static GLenum gl_blend_op(WINED3DBLENDOP op) static GLenum gl_blend_op(enum wined3d_blend_op op)
{ {
switch (op) switch (op)
{ {
case WINED3DBLENDOP_ADD: case WINED3D_BLEND_OP_ADD:
return GL_FUNC_ADD_EXT; return GL_FUNC_ADD_EXT;
case WINED3DBLENDOP_SUBTRACT: case WINED3D_BLEND_OP_SUBTRACT:
return GL_FUNC_SUBTRACT_EXT; return GL_FUNC_SUBTRACT_EXT;
case WINED3DBLENDOP_REVSUBTRACT: case WINED3D_BLEND_OP_REVSUBTRACT:
return GL_FUNC_REVERSE_SUBTRACT_EXT; return GL_FUNC_REVERSE_SUBTRACT_EXT;
case WINED3DBLENDOP_MIN: case WINED3D_BLEND_OP_MIN:
return GL_MIN_EXT; return GL_MIN_EXT;
case WINED3DBLENDOP_MAX: case WINED3D_BLEND_OP_MAX:
return GL_MAX_EXT; return GL_MAX_EXT;
default: default:
FIXME("Unhandled blend op %#x.\n", op); FIXME("Unhandled blend op %#x.\n", op);

View File

@ -1207,7 +1207,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state->render_states[WINED3DRS_COLORWRITEENABLE] = 0x0000000f; state->render_states[WINED3DRS_COLORWRITEENABLE] = 0x0000000f;
tmpfloat.f = 0.0f; tmpfloat.f = 0.0f;
state->render_states[WINED3DRS_TWEENFACTOR] = tmpfloat.d; state->render_states[WINED3DRS_TWEENFACTOR] = tmpfloat.d;
state->render_states[WINED3DRS_BLENDOP] = WINED3DBLENDOP_ADD; state->render_states[WINED3DRS_BLENDOP] = WINED3D_BLEND_OP_ADD;
state->render_states[WINED3DRS_POSITIONDEGREE] = WINED3DDEGREE_CUBIC; state->render_states[WINED3DRS_POSITIONDEGREE] = WINED3DDEGREE_CUBIC;
state->render_states[WINED3DRS_NORMALDEGREE] = WINED3DDEGREE_LINEAR; state->render_states[WINED3DRS_NORMALDEGREE] = WINED3DDEGREE_LINEAR;
/* states new in d3d9 */ /* states new in d3d9 */
@ -1247,7 +1247,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state->render_states[WINED3DRS_SEPARATEALPHABLENDENABLE] = FALSE; state->render_states[WINED3DRS_SEPARATEALPHABLENDENABLE] = FALSE;
state->render_states[WINED3DRS_SRCBLENDALPHA] = WINED3D_BLEND_ONE; state->render_states[WINED3DRS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
state->render_states[WINED3DRS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO; state->render_states[WINED3DRS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
state->render_states[WINED3DRS_BLENDOPALPHA] = WINED3DBLENDOP_ADD; state->render_states[WINED3DRS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
/* Texture Stage States - Put directly into state block, we will call function below */ /* Texture Stage States - Put directly into state block, we will call function below */
for (i = 0; i < MAX_TEXTURES; ++i) for (i = 0; i < MAX_TEXTURES; ++i)

View File

@ -404,15 +404,14 @@ enum wined3d_blend
WINED3D_BLEND_INVBLENDFACTOR = 15, WINED3D_BLEND_INVBLENDFACTOR = 15,
}; };
typedef enum _WINED3DBLENDOP enum wined3d_blend_op
{ {
WINED3DBLENDOP_ADD = 1, WINED3D_BLEND_OP_ADD = 1,
WINED3DBLENDOP_SUBTRACT = 2, WINED3D_BLEND_OP_SUBTRACT = 2,
WINED3DBLENDOP_REVSUBTRACT = 3, WINED3D_BLEND_OP_REVSUBTRACT = 3,
WINED3DBLENDOP_MIN = 4, WINED3D_BLEND_OP_MIN = 4,
WINED3DBLENDOP_MAX = 5, WINED3D_BLEND_OP_MAX = 5,
WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff };
} WINED3DBLENDOP;
typedef enum _WINED3DVERTEXBLENDFLAGS typedef enum _WINED3DVERTEXBLENDFLAGS
{ {