[cogl] attribute: Fix including progend-glsl-private.h on GL2
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] attribute: Fix including progend-glsl-private.h on GL2
- Date: Wed, 7 Dec 2011 19:03:36 +0000 (UTC)
commit 39203cb8f1a796acc682cf0ae32660d2bea83c3c
Author: Neil Roberts <neil linux intel com>
Date: Wed Dec 7 12:19:58 2011 +0000
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 <robert linux intel com>
cogl/cogl-attribute.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c
index b8d748a..665f265 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]