[cogl] disable all client tex coord arrays in _cogl_add_path_to_stencil_buffer

After flushing the journal an unknown number of client side texture arrays
may be left enabled. Disable them all before using glDrawArrays.
This commit is contained in:
Robert Bragg 2009-06-22 01:29:39 +01:00
parent 4dada4c49e
commit 186a26eb26

View File

@ -133,6 +133,7 @@ _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min,
float bounds_h;
gulong enable_flags = COGL_ENABLE_VERTEX_ARRAY;
CoglHandle prev_source;
int i;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -169,6 +170,13 @@ _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min,
GE( glColorMask (FALSE, FALSE, FALSE, FALSE) );
GE( glDepthMask (FALSE) );
for (i = 0; i < ctx->n_texcoord_arrays_enabled; i++)
{
GE (glClientActiveTexture (GL_TEXTURE0 + i));
GE (glDisableClientState (GL_TEXTURE_COORD_ARRAY));
}
ctx->n_texcoord_arrays_enabled = 0;
_cogl_current_matrix_state_flush ();
while (path_start < path_size)