Skip zero group_count images in draw_graphics()
Good to be defensive, ensures no infinite loop.
This commit is contained in:
parent
4ffb22199b
commit
e7ba91d182
1 changed files with 1 additions and 0 deletions
|
|
@ -481,6 +481,7 @@ draw_graphics(int program, ssize_t vao_idx, ImageRenderData *data, GLuint start,
|
|||
for (GLuint i=0; i < count;) {
|
||||
ImageRenderData *group = data + start + i;
|
||||
glBindTexture(GL_TEXTURE_2D, group->texture_id);
|
||||
if (group->group_count == 0) { i++; continue; }
|
||||
for (GLuint k=0; k < group->group_count; k++, i++) {
|
||||
ImageRenderData *rd = data + start + i;
|
||||
glUniform4f(u->src_rect, rd->src_rect.left, rd->src_rect.top, rd->src_rect.right, rd->src_rect.bottom);
|
||||
|
|
|
|||
Loading…
Reference in a new issue