From baa4f15774e2eb179a9b6ad6f3b781e0c3e85af3 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 27 Jul 2024 17:40:29 +1000 Subject: remove the editor folder --- src/maths/primitives.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/maths/primitives.c') diff --git a/src/maths/primitives.c b/src/maths/primitives.c index 32e7919..ceae260 100644 --- a/src/maths/primitives.c +++ b/src/maths/primitives.c @@ -45,9 +45,11 @@ Geometry Geo_CreatePlane(f32x2 extents) { push_triangle(indices, 2, 1, 0); push_triangle(indices, 3, 1, 2); - Geometry geo = { - .format = VERTEX_STATIC_3D, .vertices = vertices, .has_indices = true, .indices = indices - }; + Geometry geo = { .format = VERTEX_STATIC_3D, + .vertices = vertices, + .has_indices = true, + .index_count = indices->len, + .indices = indices }; // .colour = (rgba){ 0, 0, 0, 1 } }; return geo; @@ -126,6 +128,7 @@ Geometry Geo_CreateCuboid(f32x3 extents) { .format = VERTEX_STATIC_3D, .vertices = vertices, .has_indices = true, + .index_count = indices->len, .indices = indices, // FIXME: make darray methods that return stack allocated struct }; @@ -233,6 +236,7 @@ Geometry geo_create_uvsphere(f32 radius, u32 north_south_lines, u32 east_west_li .format = VERTEX_STATIC_3D, .vertices = vertices, .has_indices = true, + .index_count = indices->len, .indices = indices, }; return geo; -- cgit v1.2.3-70-g09d2