From d33f66303f0e4bb1f44a34f3aa7b5b8887b05665 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 17 Jan 2011 12:06:13 +0000 Subject: [PATCH] cogl-pipeline: Fix the enum names for the constant combine source When determining whether to hash the combine constant Cogl checks the arguments to the combine funcs to determine whether the combine constant is used. However is was using the GLenums GL_CONSTANT_COLOR and GL_CONSTANT_ALPHA but these are not valid values for the CoglPipelineCombineSource enum so presumably the constant would never get hashed. This patch makes it use Cogl's enum of COGL_PIPELINE_COMBINE_SOURCE_CONSTANT instead. http://bugzilla.clutter-project.org/show_bug.cgi?id=2516 --- cogl/cogl-pipeline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c index 5517dffc9..91f0fbf1e 100644 --- a/cogl/cogl-pipeline.c +++ b/cogl/cogl-pipeline.c @@ -5987,11 +5987,11 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority, n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_rgb_func); for (i = 0; i < n_args; i++) { - if (b->texture_combine_rgb_src[i] == GL_CONSTANT_COLOR || - b->texture_combine_rgb_src[i] == GL_CONSTANT_ALPHA) + if (b->texture_combine_rgb_src[i] == + COGL_PIPELINE_COMBINE_SOURCE_CONSTANT) { /* XXX: should we be careful to only hash the alpha - * component in the GL_CONSTANT_ALPHA case? */ + * component in the COGL_PIPELINE_COMBINE_OP_SRC_ALPHA case? */ need_hash = TRUE; goto done; } @@ -6000,11 +6000,11 @@ _cogl_pipeline_layer_hash_combine_constant_state (CoglPipelineLayer *authority, n_args = _cogl_get_n_args_for_combine_func (b->texture_combine_alpha_func); for (i = 0; i < n_args; i++) { - if (b->texture_combine_alpha_src[i] == GL_CONSTANT_COLOR || - b->texture_combine_alpha_src[i] == GL_CONSTANT_ALPHA) + if (b->texture_combine_alpha_src[i] == + COGL_PIPELINE_COMBINE_SOURCE_CONSTANT) { /* XXX: should we be careful to only hash the alpha - * component in the GL_CONSTANT_ALPHA case? */ + * component in the COGL_PIPELINE_COMBINE_OP_SRC_ALPHA case? */ need_hash = TRUE; goto done; }