cogl: glBlendFuncSeparate is always available

So we don't need glBlendFunc.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/903
This commit is contained in:
Adam Jackson 2019-10-22 19:30:16 -04:00 committed by Georges Basile Stavracas Neto
parent 07ca100130
commit 9cbf83d59c
2 changed files with 4 additions and 15 deletions

View File

@ -474,7 +474,6 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
CoglPipelineBlendState *blend_state =
&authority->big_state->blend_state;
/* GLES 1 only has glBlendFunc */
#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
if (blend_factor_uses_constant (blend_state->blend_src_factor_rgb) ||
blend_factor_uses_constant (blend_state
@ -498,18 +497,10 @@ _cogl_pipeline_flush_color_blend_alpha_depth_state (
GE (ctx, glBlendEquationSeparate (blend_state->blend_equation_rgb,
blend_state->blend_equation_alpha));
if (ctx->glBlendFuncSeparate &&
(blend_state->blend_src_factor_rgb !=
blend_state->blend_src_factor_alpha ||
(blend_state->blend_dst_factor_rgb !=
blend_state->blend_dst_factor_alpha)))
GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
blend_state->blend_dst_factor_rgb,
blend_state->blend_src_factor_alpha,
blend_state->blend_dst_factor_alpha));
else
GE (ctx, glBlendFunc (blend_state->blend_src_factor_rgb,
blend_state->blend_dst_factor_rgb));
GE (ctx, glBlendFuncSeparate (blend_state->blend_src_factor_rgb,
blend_state->blend_dst_factor_rgb,
blend_state->blend_src_factor_alpha,
blend_state->blend_dst_factor_alpha));
}
#endif

View File

@ -70,8 +70,6 @@ COGL_EXT_FUNCTION (void, glBindBuffer,
GLuint buffer))
COGL_EXT_FUNCTION (void, glBindTexture,
(GLenum target, GLuint texture))
COGL_EXT_FUNCTION (void, glBlendFunc,
(GLenum sfactor, GLenum dfactor))
COGL_EXT_FUNCTION (void, glBufferData,
(GLenum target,
GLsizeiptr size,