From 17ae64baecd05978fabab9bec0c967a66dea299d Mon Sep 17 00:00:00 2001 From: bjorn Date: Sat, 31 Aug 2019 03:00:40 -0700 Subject: [PATCH] Fix sphere winding; --- src/modules/graphics/graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/graphics.c b/src/modules/graphics/graphics.c index c9b10cbd..b225762c 100644 --- a/src/modules/graphics/graphics.c +++ b/src/modules/graphics/graphics.c @@ -1156,7 +1156,7 @@ void lovrGraphicsSphere(Material* material, mat4 transform, int segments) { for (int j = 0; j < segments; j++) { uint16_t i0 = offset0 + j; uint16_t i1 = offset1 + j; - memcpy(indices, ((uint16_t[]) { i0, i1, i0 + 1, i1, i1 + 1, i0 + 1 }), 6 * sizeof(uint16_t)); + memcpy(indices, ((uint16_t[]) { i0, i0 + 1, i1, i1, i0 + 1, i1 + 1 }), 6 * sizeof(uint16_t)); indices += 6; } }