From aa53dccfce2a425d309d7be99cd2cd6e771c92be Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 27 May 2010 14:54:14 +0100 Subject: [PATCH] cogl-vertex-buffer: Don't disable any texture coord arrays The enabled state of the texture coord arrays is cached in the cogl context so there is no need to disable them when we've finished rendering a vbo. --- clutter/cogl/cogl/cogl-vertex-buffer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clutter/cogl/cogl/cogl-vertex-buffer.c b/clutter/cogl/cogl/cogl-vertex-buffer.c index a4cade0c4..9c21d91c0 100644 --- a/clutter/cogl/cogl/cogl-vertex-buffer.c +++ b/clutter/cogl/cogl/cogl-vertex-buffer.c @@ -1762,9 +1762,11 @@ disable_state_for_drawing_buffer (CoglVertexBuffer *buffer) GE (glDisableClientState (GL_NORMAL_ARRAY)); break; case COGL_VERTEX_BUFFER_ATTRIB_FLAG_TEXTURE_COORD_ARRAY: - GE (glClientActiveTexture (GL_TEXTURE0 + - attribute->texture_unit)); - GE (glDisableClientState (GL_TEXTURE_COORD_ARRAY)); + /* The enabled state of the texture coord arrays is + cached in ctx->enabled_texcoord_arrays so we don't + need to do anything here. The array will be disabled + by the next drawing primitive if it is not + required */ break; case COGL_VERTEX_BUFFER_ATTRIB_FLAG_VERTEX_ARRAY: /* GE (glDisableClientState (GL_VERTEX_ARRAY)); */