[mutter] cogl: glBlendFuncSeparate is always available
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: glBlendFuncSeparate is always available
- Date: Fri, 8 Nov 2019 12:35:42 +0000 (UTC)
commit 9cbf83d59c7e9610aed28a50b6312659e6a19b45
Author: Adam Jackson <ajax redhat com>
Date: Tue Oct 22 19:30:16 2019 -0400
cogl: glBlendFuncSeparate is always available
So we don't need glBlendFunc.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/903
cogl/cogl/driver/gl/cogl-pipeline-opengl.c | 17 ++++-------------
cogl/cogl/gl-prototypes/cogl-core-functions.h | 2 --
2 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
index c764c054f..adda93567 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -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
diff --git a/cogl/cogl/gl-prototypes/cogl-core-functions.h b/cogl/cogl/gl-prototypes/cogl-core-functions.h
index 2fce643a5..0236096c5 100644
--- a/cogl/cogl/gl-prototypes/cogl-core-functions.h
+++ b/cogl/cogl/gl-prototypes/cogl-core-functions.h
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]