From 38971e4977e7d57fd543d598b08f902160b2093c Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Tue, 7 Dec 2010 10:38:51 +0000 Subject: [PATCH] cogl2-path: Don't flush the enable flags All of the drawing needed in _cogl_add_path_to_stencil_buffer is done with the vertex attribute API so there should be no need to flush the enable flags to enable the vertex array. This was causing problems on GLES2 where the vertex array isn't available. --- cogl/cogl2-path.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cogl/cogl2-path.c b/cogl/cogl2-path.c index 02c669a36..fc81de742 100644 --- a/cogl/cogl2-path.c +++ b/cogl/cogl2-path.c @@ -351,7 +351,6 @@ _cogl_add_path_to_stencil_buffer (CoglPath *path, gboolean need_clear) { CoglPathData *data = path->data; - unsigned long enable_flags = COGL_ENABLE_VERTEX_ARRAY; CoglFramebuffer *framebuffer = _cogl_get_framebuffer (); CoglMatrixStack *modelview_stack = _cogl_framebuffer_get_modelview_stack (framebuffer); @@ -373,8 +372,6 @@ _cogl_add_path_to_stencil_buffer (CoglPath *path, _cogl_pipeline_flush_gl_state (ctx->stencil_pipeline, FALSE, 0); - _cogl_enable (enable_flags); - GE( glEnable (GL_STENCIL_TEST) ); GE( glColorMask (FALSE, FALSE, FALSE, FALSE) ); @@ -407,8 +404,6 @@ _cogl_add_path_to_stencil_buffer (CoglPath *path, data->path_nodes_min.y, data->path_nodes_max.x, data->path_nodes_max.y); - /* NB: The rectangle may trash the enable flags */ - _cogl_enable (enable_flags); } GE (glStencilMask (1)); GE (glStencilFunc (GL_LEQUAL, 0x1, 0x3));