From 935db8eec29b5961856ba5454286fe0be63cc575 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 23 Mar 2009 12:46:20 +0000 Subject: [PATCH] [build] Fixes a cogl-vertex-buffer.c warning when building for GLES GLES 1 doesn't support GLSL so it never needs to use the generic_index variable for generic attributes which was flagging a warning. --- common/cogl-vertex-buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/cogl-vertex-buffer.c b/common/cogl-vertex-buffer.c index 2e9b8749b..7e6a2b1a0 100644 --- a/common/cogl-vertex-buffer.c +++ b/common/cogl-vertex-buffer.c @@ -1435,7 +1435,9 @@ enable_state_for_drawing_buffer (CoglVertexBuffer *buffer) { GList *tmp; GLenum gl_type; +#ifdef MAY_HAVE_PROGRAMABLE_GL GLuint generic_index = 0; +#endif gulong enable_flags = 0; guint max_texcoord_attrib_unit = 0; const GList *layers; @@ -1577,7 +1579,9 @@ disable_state_for_drawing_buffer (CoglVertexBuffer *buffer) { GList *tmp; GLenum gl_type; +#ifdef MAY_HAVE_PROGRAMABLE_GL GLuint generic_index = 0; +#endif _COGL_GET_CONTEXT (ctx, NO_RETVAL); @@ -1586,7 +1590,6 @@ disable_state_for_drawing_buffer (CoglVertexBuffer *buffer) */ GE (glBindBuffer (GL_ARRAY_BUFFER, 0)); - generic_index = 0; for (tmp = buffer->submitted_vbos; tmp != NULL; tmp = tmp->next) { CoglVertexBufferVBO *cogl_vbo = tmp->data;