[PATCH 5/5] wined3d: Get rid of the WINED3DBLENDOP typedef.
Henri Verbeet
hverbeet at codeweavers.com
Mon Dec 19 06:37:14 CST 2011
---
dlls/wined3d/state.c | 12 ++++++------
dlls/wined3d/stateblock.c | 4 ++--
include/wine/wined3d.h | 15 +++++++--------
3 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 7d8c6a4..390519f 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -242,19 +242,19 @@ static void state_blendop_w(struct wined3d_context *context, const struct wined3
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)
{
- case WINED3DBLENDOP_ADD:
+ case WINED3D_BLEND_OP_ADD:
return GL_FUNC_ADD_EXT;
- case WINED3DBLENDOP_SUBTRACT:
+ case WINED3D_BLEND_OP_SUBTRACT:
return GL_FUNC_SUBTRACT_EXT;
- case WINED3DBLENDOP_REVSUBTRACT:
+ case WINED3D_BLEND_OP_REVSUBTRACT:
return GL_FUNC_REVERSE_SUBTRACT_EXT;
- case WINED3DBLENDOP_MIN:
+ case WINED3D_BLEND_OP_MIN:
return GL_MIN_EXT;
- case WINED3DBLENDOP_MAX:
+ case WINED3D_BLEND_OP_MAX:
return GL_MAX_EXT;
default:
FIXME("Unhandled blend op %#x.\n", op);
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 54dd551..e4acd54 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1207,7 +1207,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state->render_states[WINED3DRS_COLORWRITEENABLE] = 0x0000000f;
tmpfloat.f = 0.0f;
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_NORMALDEGREE] = WINED3DDEGREE_LINEAR;
/* 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_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
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 */
for (i = 0; i < MAX_TEXTURES; ++i)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 9a8c131..a3e9971 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -404,15 +404,14 @@ enum wined3d_blend
WINED3D_BLEND_INVBLENDFACTOR = 15,
};
-typedef enum _WINED3DBLENDOP
-{
- WINED3DBLENDOP_ADD = 1,
- WINED3DBLENDOP_SUBTRACT = 2,
- WINED3DBLENDOP_REVSUBTRACT = 3,
- WINED3DBLENDOP_MIN = 4,
- WINED3DBLENDOP_MAX = 5,
- WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff
-} WINED3DBLENDOP;
+enum wined3d_blend_op
+{
+ WINED3D_BLEND_OP_ADD = 1,
+ WINED3D_BLEND_OP_SUBTRACT = 2,
+ WINED3D_BLEND_OP_REVSUBTRACT = 3,
+ WINED3D_BLEND_OP_MIN = 4,
+ WINED3D_BLEND_OP_MAX = 5,
+};
typedef enum _WINED3DVERTEXBLENDFLAGS
{
--
1.7.3.4
More information about the wine-patches
mailing list