Henri Verbeet : wined3d: Fix the EXT_blend_color extension definitions.

Alexandre Julliard julliard at winehq.org
Fri Apr 1 09:40:59 CDT 2011


Module: wine
Branch: master
Commit: e4e28c47ea2cc6a75c027687fa1e1962ab1ff29c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e4e28c47ea2cc6a75c027687fa1e1962ab1ff29c

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Mar 31 20:04:44 2011 +0200

wined3d: Fix the EXT_blend_color extension definitions.

---

 dlls/wined3d/state.c      |   16 ++++++++--------
 dlls/wined3d/wined3d_gl.h |   14 +++++++++++++-
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index a37f8ce..ad9374d 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -314,8 +314,8 @@ static void state_blend(DWORD state, struct wined3d_stateblock *stateblock, stru
             FIXME("WINED3DRS_DESTBLEND = WINED3DBLEND_BOTHINVSRCALPHA, what to do?\n");
             break;
 
-        case WINED3DBLEND_BLENDFACTOR        : dstBlend = GL_CONSTANT_COLOR;   break;
-        case WINED3DBLEND_INVBLENDFACTOR     : dstBlend = GL_ONE_MINUS_CONSTANT_COLOR;  break;
+        case WINED3DBLEND_BLENDFACTOR        : dstBlend = GL_CONSTANT_COLOR_EXT;  break;
+        case WINED3DBLEND_INVBLENDFACTOR     : dstBlend = GL_ONE_MINUS_CONSTANT_COLOR_EXT;  break;
         default:
             FIXME("Unrecognized dst blend value %#x.\n",
                     stateblock->state.render_states[WINED3DRS_DESTBLEND]);
@@ -348,8 +348,8 @@ static void state_blend(DWORD state, struct wined3d_stateblock *stateblock, stru
             dstBlend = GL_SRC_ALPHA;
             break;
 
-        case WINED3DBLEND_BLENDFACTOR        : srcBlend = GL_CONSTANT_COLOR;   break;
-        case WINED3DBLEND_INVBLENDFACTOR     : srcBlend = GL_ONE_MINUS_CONSTANT_COLOR;  break;
+        case WINED3DBLEND_BLENDFACTOR        : srcBlend = GL_CONSTANT_COLOR_EXT;  break;
+        case WINED3DBLEND_INVBLENDFACTOR     : srcBlend = GL_ONE_MINUS_CONSTANT_COLOR_EXT;  break;
         default:
             FIXME("Unrecognized src blend value %#x.\n",
                     stateblock->state.render_states[WINED3DRS_SRCBLEND]);
@@ -417,8 +417,8 @@ static void state_blend(DWORD state, struct wined3d_stateblock *stateblock, stru
                 srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA;
                 FIXME("WINED3DRS_DESTBLENDALPHA = WINED3DBLEND_BOTHINVSRCALPHA, what to do?\n");
                 break;
-            case WINED3DBLEND_BLENDFACTOR        : dstBlendAlpha = GL_CONSTANT_COLOR;   break;
-            case WINED3DBLEND_INVBLENDFACTOR     : dstBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR;  break;
+            case WINED3DBLEND_BLENDFACTOR        : dstBlendAlpha = GL_CONSTANT_COLOR_EXT;  break;
+            case WINED3DBLEND_INVBLENDFACTOR     : dstBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR_EXT;  break;
             default:
                 FIXME("Unrecognized dst blend alpha value %#x.\n",
                         stateblock->state.render_states[WINED3DRS_DESTBLENDALPHA]);
@@ -445,8 +445,8 @@ static void state_blend(DWORD state, struct wined3d_stateblock *stateblock, stru
                 srcBlendAlpha = GL_ONE_MINUS_SRC_ALPHA;
                 dstBlendAlpha = GL_SRC_ALPHA;
                 break;
-            case WINED3DBLEND_BLENDFACTOR        : srcBlendAlpha = GL_CONSTANT_COLOR;   break;
-            case WINED3DBLEND_INVBLENDFACTOR     : srcBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR;  break;
+            case WINED3DBLEND_BLENDFACTOR        : srcBlendAlpha = GL_CONSTANT_COLOR_EXT;  break;
+            case WINED3DBLEND_INVBLENDFACTOR     : srcBlendAlpha = GL_ONE_MINUS_CONSTANT_COLOR_EXT;  break;
             default:
                 FIXME("Unrecognized src blend alpha value %#x.\n",
                         stateblock->state.render_states[WINED3DRS_SRCBLENDALPHA]);
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index 4c20e70..fc362a7 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -2970,6 +2970,18 @@ typedef void (WINE_GLAPI *PGLFNSTENCILFUNCSEPARATEATIPROC)(GLenum, GLenum, GLint
 #define GL_MIRROR_CLAMP_TO_EDGE_ATI                         0x8743
 #endif
 
+/* GL_EXT_blend_color */
+#ifndef GL_EXT_blend_color
+#define GL_EXT_blend_color 1
+#define GL_CONSTANT_COLOR_EXT                               0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR_EXT                     0x8002
+#define GL_CONSTANT_ALPHA_EXT                               0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT                     0x8004
+#define GL_BLEND_COLOR_EXT                                  0x8005
+#endif
+typedef GLvoid (WINE_GLAPI *PGLFNBLENDCOLOREXTPROC)(GLclampf red,
+        GLclampf green, GLclampf blue, GLclampf alpha);
+
 /* GL_EXT_blend_equation_separate */
 typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLenum modeAlpha);
 
@@ -4237,7 +4249,7 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSWAPINTERVALEXTPROC)(int interval);
     USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, \
             glStencilFuncSeparateATI,                   ATI_SEPARATE_STENCIL,           NULL) \
     /* GL_EXT_blend_color */ \
-    USE_GL_FUNC(PGLFNBLENDCOLORPROC, \
+    USE_GL_FUNC(PGLFNBLENDCOLOREXTPROC, \
             glBlendColorEXT,                            EXT_BLEND_COLOR,                NULL) \
     /* GL_EXT_blend_equation_separate */ \
     USE_GL_FUNC(PGLFNBLENDFUNCSEPARATEEXTPROC, \




More information about the wine-cvs mailing list