1
0
Fork 0

[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 8873c6a11a
commit 8b67916cc1

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 =
COGL_MATERIAL_FLUSH_FALLBACK_MASK |
COGL_MATERIAL_FLUSH_DISABLE_MASK;