[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.
This commit is contained in:
Robert Bragg 2009-06-24 18:10:50 +01:00
parent 186a26eb26
commit 2ae3d4b1c1

View File

@ -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 = options.flags =
COGL_MATERIAL_FLUSH_FALLBACK_MASK | COGL_MATERIAL_FLUSH_FALLBACK_MASK |
COGL_MATERIAL_FLUSH_DISABLE_MASK; COGL_MATERIAL_FLUSH_DISABLE_MASK;