mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
[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:
parent
fd4a6f9c81
commit
acdc36a7c5
@ -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 &&
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user