From 39203cb8f1a796acc682cf0ae32660d2bea83c3c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 7 Dec 2011 12:19:58 +0000 Subject: [PATCH] attribute: Fix including progend-glsl-private.h on GL2 Previously this header was only included on GLES2 but since 7283e0a4 the progend is used on any driver where GLSL is available. This changes the #ifdef to check for the presence of the GLSL progend. Based on a patch by Fan, Chun-wei https://bugzilla.gnome.org/show_bug.cgi?id=665722 Reviewed-by: Robert Bragg --- cogl/cogl-attribute.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c index b8d748aa6..665f265f6 100644 --- a/cogl/cogl-attribute.c +++ b/cogl/cogl-attribute.c @@ -41,7 +41,7 @@ #include "cogl-texture-private.h" #include "cogl-framebuffer-private.h" #include "cogl-indices-private.h" -#ifdef HAVE_COGL_GLES2 +#ifdef COGL_PIPELINE_PROGEND_GLSL #include "cogl-pipeline-progend-glsl-private.h" #endif #include "cogl-private.h" @@ -481,6 +481,8 @@ foreach_changed_bit_and_save (CoglContext *context, _cogl_bitmask_set_bits (current_bits, new_bits); } +#ifdef COGL_PIPELINE_PROGEND_GLSL + static void setup_generic_attribute (CoglContext *context, CoglPipeline *pipeline, @@ -503,6 +505,8 @@ setup_generic_attribute (CoglContext *context, } } +#endif /* COGL_PIPELINE_PROGEND_GLSL */ + static void apply_attribute_enable_updates (CoglContext *context, CoglPipeline *pipeline) @@ -747,8 +751,10 @@ flush_state (CoglDrawFlags flags, } break; case COGL_ATTRIBUTE_NAME_ID_CUSTOM_ARRAY: +#ifdef COGL_PIPELINE_PROGEND_GLSL if (ctx->driver != COGL_DRIVER_GLES1) setup_generic_attribute (ctx, source, attribute, base); +#endif break; default: g_warning ("Unrecognised attribute type 0x%08x", attribute->type);