From 186a26eb266d564086b6867885b395fb6327fc50 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Mon, 22 Jun 2009 01:29:39 +0100 Subject: [PATCH] [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. --- gl/cogl-primitives.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gl/cogl-primitives.c b/gl/cogl-primitives.c index d4ab7de0c..cb6671c08 100644 --- a/gl/cogl-primitives.c +++ b/gl/cogl-primitives.c @@ -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)