summaryrefslogtreecommitdiff
path: root/src/maths/primitives.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-11 23:12:59 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-08-11 23:12:59 +1000
commit3a151b1d1f99b59dfd6d98c1e7520b48b57d6f5e (patch)
treeaecbe2462529eae01dc16b54d529548e8ae870e9 /src/maths/primitives.c
parentb03bde3d412148cd573f5f14012cdd270f309947 (diff)
plane,cube,sphere
Diffstat (limited to 'src/maths/primitives.c')
-rw-r--r--src/maths/primitives.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/maths/primitives.c b/src/maths/primitives.c
index d353d33..bb8a348 100644
--- a/src/maths/primitives.c
+++ b/src/maths/primitives.c
@@ -199,7 +199,7 @@ Geometry Geo_CreateUVsphere(f32 radius, u32 north_south_lines, u32 east_west_lin
for (u32 i = 0; i < north_south_lines; i++) {
u32 i1 = i + 1;
u32 i2 = (i + 1) % north_south_lines + 1;
- push_triangle(indices, 0, i1, i2);
+ push_triangle(indices, 0, i2, i1);
/* TRACE("Push triangle (%.2f %.2f %.2f)->(%.2f %.2f %.2f)->(%.2f %.2f %.2f)\n", */
/* vertices->data[0].static_3d.position.x, vertices->data[0].static_3d.position.y, */
/* vertices->data[0].static_3d.position.z, vertices->data[i1].static_3d.position.x, */
@@ -209,7 +209,7 @@ Geometry Geo_CreateUVsphere(f32 radius, u32 north_south_lines, u32 east_west_lin
u32 bot = vertices->len - 1;
u32 i3 = i + north_south_lines * (east_west_lines - 2) + 1;
u32 i4 = (i + 1) % north_south_lines + north_south_lines * (east_west_lines - 2) + 1;
- push_triangle(indices, i3, bot, i4);
+ push_triangle(indices, bot, i3, i4);
}
// quads