Commit 3ccb66f4 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Use the core version of the glBlend* functions.

parent 993075cd
...@@ -2876,6 +2876,10 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) ...@@ -2876,6 +2876,10 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
/* Newer core functions */ /* Newer core functions */
USE_GL_FUNC(glActiveTexture) /* OpenGL 1.3 */ USE_GL_FUNC(glActiveTexture) /* OpenGL 1.3 */
USE_GL_FUNC(glBlendColor) /* OpenGL 1.4 */
USE_GL_FUNC(glBlendEquation) /* OpenGL 1.4 */
USE_GL_FUNC(glBlendEquationSeparate) /* OpenGL 2.0 */
USE_GL_FUNC(glBlendFuncSeparate) /* OpenGL 1.4 */
#undef USE_GL_FUNC #undef USE_GL_FUNC
#ifndef USE_WIN32_OPENGL #ifndef USE_WIN32_OPENGL
...@@ -2892,6 +2896,10 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) ...@@ -2892,6 +2896,10 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
} while (0) } while (0)
MAP_GL_FUNCTION(glActiveTexture, glActiveTextureARB); MAP_GL_FUNCTION(glActiveTexture, glActiveTextureARB);
MAP_GL_FUNCTION(glBlendColor, glBlendColorEXT);
MAP_GL_FUNCTION(glBlendEquation, glBlendEquationEXT);
MAP_GL_FUNCTION(glBlendEquationSeparate, glBlendEquationSeparateEXT);
MAP_GL_FUNCTION(glBlendFuncSeparate, glBlendFuncSeparateEXT);
#undef MAP_GL_FUNCTION #undef MAP_GL_FUNCTION
} }
......
...@@ -317,7 +317,7 @@ static void state_blendop(struct wined3d_context *context, const struct wined3d_ ...@@ -317,7 +317,7 @@ static void state_blendop(struct wined3d_context *context, const struct wined3d_
if (state->render_states[WINED3D_RS_BLENDOPALPHA] if (state->render_states[WINED3D_RS_BLENDOPALPHA]
&& !gl_info->supported[EXT_BLEND_EQUATION_SEPARATE]) && !gl_info->supported[EXT_BLEND_EQUATION_SEPARATE])
{ {
WARN("Unsupported in local OpenGL implementation: glBlendEquationSeparateEXT\n"); WARN("Unsupported in local OpenGL implementation: glBlendEquationSeparate.\n");
return; return;
} }
...@@ -327,12 +327,12 @@ static void state_blendop(struct wined3d_context *context, const struct wined3d_ ...@@ -327,12 +327,12 @@ static void state_blendop(struct wined3d_context *context, const struct wined3d_
if (state->render_states[WINED3D_RS_SEPARATEALPHABLENDENABLE]) if (state->render_states[WINED3D_RS_SEPARATEALPHABLENDENABLE])
{ {
GL_EXTCALL(glBlendEquationSeparateEXT(blend_equation, blend_equation_alpha)); GL_EXTCALL(glBlendEquationSeparate(blend_equation, blend_equation_alpha));
checkGLcall("glBlendEquationSeparateEXT"); checkGLcall("glBlendEquationSeparate");
} }
else else
{ {
GL_EXTCALL(glBlendEquationEXT(blend_equation)); GL_EXTCALL(glBlendEquation(blend_equation));
checkGLcall("glBlendEquation"); checkGLcall("glBlendEquation");
} }
} }
...@@ -462,7 +462,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st ...@@ -462,7 +462,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
/* Separate alpha blending requires GL_EXT_blend_function_separate, so make sure it is around */ /* Separate alpha blending requires GL_EXT_blend_function_separate, so make sure it is around */
if (!context->gl_info->supported[EXT_BLEND_FUNC_SEPARATE]) if (!context->gl_info->supported[EXT_BLEND_FUNC_SEPARATE])
{ {
WARN("Unsupported in local OpenGL implementation: glBlendFuncSeparateEXT\n"); WARN("Unsupported in local OpenGL implementation: glBlendFuncSeparate.\n");
return; return;
} }
...@@ -486,8 +486,8 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st ...@@ -486,8 +486,8 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
dstBlendAlpha = gl_blend_factor(state->render_states[WINED3D_RS_DESTBLENDALPHA], rt_format); dstBlendAlpha = gl_blend_factor(state->render_states[WINED3D_RS_DESTBLENDALPHA], rt_format);
} }
GL_EXTCALL(glBlendFuncSeparateEXT(srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha)); GL_EXTCALL(glBlendFuncSeparate(srcBlend, dstBlend, srcBlendAlpha, dstBlendAlpha));
checkGLcall("glBlendFuncSeparateEXT"); checkGLcall("glBlendFuncSeparate");
} }
else else
{ {
...@@ -504,7 +504,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st ...@@ -504,7 +504,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
static void state_blendfactor_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) static void state_blendfactor_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{ {
WARN("Unsupported in local OpenGL implementation: glBlendColorEXT\n"); WARN("Unsupported in local OpenGL implementation: glBlendColor.\n");
} }
static void state_blendfactor(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) static void state_blendfactor(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
...@@ -515,7 +515,7 @@ static void state_blendfactor(struct wined3d_context *context, const struct wine ...@@ -515,7 +515,7 @@ static void state_blendfactor(struct wined3d_context *context, const struct wine
TRACE("Setting blend factor to %#x.\n", state->render_states[WINED3D_RS_BLENDFACTOR]); TRACE("Setting blend factor to %#x.\n", state->render_states[WINED3D_RS_BLENDFACTOR]);
D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_BLENDFACTOR], col); D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_BLENDFACTOR], col);
GL_EXTCALL(glBlendColorEXT (col[0],col[1],col[2],col[3])); GL_EXTCALL(glBlendColor(col[0], col[1], col[2], col[3]));
checkGLcall("glBlendColor"); checkGLcall("glBlendColor");
} }
......
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