[cogl-texture] Fix offset to next quad when flushing the log

When the quad log contains multiple textures (such as when a sliced
texture is drawn) it dispatches the log with multiple calls to
flush_quad_batch and walks a pointer along the list of vertices.
However this pointer was being incremented by only one vertex so the
next quad would be drawn with three of the vertices from the last
quad.
This commit is contained in:
Neil Roberts 2009-02-05 19:48:00 +00:00
parent fd4a6f9c81
commit acdc36a7c5
2 changed files with 4 additions and 4 deletions

View File

@ -2145,9 +2145,9 @@ _cogl_journal_flush (void)
CoglJournalEntry *current_entry = prev_entry + 1;
gsize stride;
/* Progress the vertex pointer */
/* Progress the vertex pointer to the next quad */
stride = 2 + current_entry->n_layers * 2;
current_vertex_pointer += stride;
current_vertex_pointer += stride * 4;
/* batch rectangles using the same textures */
if (current_entry->material == prev_entry->material &&

View File

@ -2258,9 +2258,9 @@ _cogl_journal_flush (void)
CoglJournalEntry *current_entry = prev_entry + 1;
gsize stride;
/* Progress the vertex pointer */
/* Progress the vertex pointer to the next quad */
stride = 2 + current_entry->n_layers * 2;
current_vertex_pointer += stride;
current_vertex_pointer += stride * 4;
/* batch rectangles using the same textures */
if (current_entry->material == prev_entry->material &&