Skip to content

Commit

Permalink
Fixed an issue when there is nothing to render
Browse files Browse the repository at this point in the history
  • Loading branch information
tanis2000 committed Oct 11, 2023
1 parent 81bdbe8 commit 6645e3c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/binocle/core/binocle_gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ void binocle_gd_draw(binocle_gd *gd, const struct binocle_vpct *vertices, size_t
KSORT_INIT(binocle_gd_sort_commands, binocle_gd_command_t, binocle_gd_command_lt)

void binocle_gd_render_offscreen(binocle_gd *gd) {
if (gd->num_vertices == 0) {
return;
}
sg_update_buffer(gd->offscreen.vbuf, &(sg_range){ .ptr=gd->vertices, .size=gd->num_vertices * sizeof(binocle_vpct) });

sg_begin_pass(gd->offscreen.pass, &gd->offscreen.action);
Expand Down

0 comments on commit 6645e3c

Please sign in to comment.