[cogl-texture] Reset size of vertex log after drawing a polygon
authorNeil Roberts <neil@linux.intel.com>
Wed, 28 Jan 2009 12:00:01 +0000 (12:00 +0000)
committerNeil Roberts <neil@linux.intel.com>
Wed, 28 Jan 2009 12:24:11 +0000 (12:24 +0000)
Otherwise trying to render a rectangle after a polygon doesn't work
because it expects the array to be empty when it starts logging
vertices.

clutter/cogl/gl/cogl-texture.c
clutter/cogl/gles/cogl-texture.c

index 96f0b5d..06ba7ae 100644 (file)
@@ -3096,5 +3096,9 @@ cogl_polygon (CoglTextureVertex *vertices,
                                          stride,
                                          use_color,
                                          fallback_mask);
+
+  /* Reset the size of the logged vertex array because rendering
+     rectangles expects it to start at 0 */
+  g_array_set_size (ctx->logged_vertices, 0);
 }
 
index 05a4eb2..1300b1f 100644 (file)
@@ -3193,5 +3193,9 @@ cogl_polygon (CoglTextureVertex *vertices,
                                          stride,
                                          use_color,
                                          fallback_mask);
+
+  /* Reset the size of the logged vertex array because rendering
+     rectangles expects it to start at 0 */
+  g_array_set_size (ctx->logged_vertices, 0);
 }