From e72042648c2d481e7be3f395f080e798cea82c46 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 28 Jan 2009 12:00:01 +0000 Subject: [PATCH] [cogl-texture] Reset size of vertex log after drawing a polygon 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 | 4 ++++ clutter/cogl/gles/cogl-texture.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/clutter/cogl/gl/cogl-texture.c b/clutter/cogl/gl/cogl-texture.c index 96f0b5dbe..06ba7aece 100644 --- a/clutter/cogl/gl/cogl-texture.c +++ b/clutter/cogl/gl/cogl-texture.c @@ -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); } diff --git a/clutter/cogl/gles/cogl-texture.c b/clutter/cogl/gles/cogl-texture.c index 05a4eb238..1300b1f9f 100644 --- a/clutter/cogl/gles/cogl-texture.c +++ b/clutter/cogl/gles/cogl-texture.c @@ -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); }