twn_lines: bail on empty batch
This commit is contained in:
parent
4a41f47a58
commit
5be4ed4645
@ -83,6 +83,9 @@ void draw_line_3d(Vec3 start,
|
|||||||
void render_lines(LinePrimitive const *line, bool is_3d) {
|
void render_lines(LinePrimitive const *line, bool is_3d) {
|
||||||
DeferredCommandDraw command = {0};
|
DeferredCommandDraw command = {0};
|
||||||
|
|
||||||
|
if (arrlenu(line->vertices) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
VertexBuffer buffer = get_scratch_vertex_array();
|
VertexBuffer buffer = get_scratch_vertex_array();
|
||||||
specify_vertex_buffer(buffer, line->vertices, arrlenu(line->vertices) * sizeof (*line->vertices));
|
specify_vertex_buffer(buffer, line->vertices, arrlenu(line->vertices) * sizeof (*line->vertices));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user