From 8b67916cc1e2aed7861214205fc0d68c0c6d67f1 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 24 Jun 2009 18:10:50 +0100 Subject: [PATCH] [cogl-vertex-buffer] Disable unused client tex coord arrays Before any cogl vertex buffer drawing we call enable_state_for_drawing_buffer which sets up the GL state, but we weren't disabling unsed client texture coord arrays. --- clutter/cogl/common/cogl-vertex-buffer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clutter/cogl/common/cogl-vertex-buffer.c b/clutter/cogl/common/cogl-vertex-buffer.c index da99aeea8..2892bfe71 100644 --- a/clutter/cogl/common/cogl-vertex-buffer.c +++ b/clutter/cogl/common/cogl-vertex-buffer.c @@ -1644,6 +1644,13 @@ enable_state_for_drawing_buffer (CoglVertexBuffer *buffer) } } + for (i = max_texcoord_attrib_unit + 1; i < ctx->n_texcoord_arrays_enabled; i++) + { + GE (glClientActiveTexture (GL_TEXTURE0 + i)); + GE (glDisableClientState (GL_TEXTURE_COORD_ARRAY)); + } + ctx->n_texcoord_arrays_enabled = max_texcoord_attrib_unit + 1; + options.flags = COGL_MATERIAL_FLUSH_FALLBACK_MASK | COGL_MATERIAL_FLUSH_DISABLE_MASK;