From 7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb Mon Sep 17 00:00:00 2001 From: raysan5 Date: Wed, 28 Jul 2021 13:12:16 +0200 Subject: [PATCH] REVERTED: Mesh indices issue #1891 --- src/models.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models.c b/src/models.c index c66371396..18ae48d15 100644 --- a/src/models.c +++ b/src/models.c @@ -1178,12 +1178,12 @@ void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int ins if (instancing) // Draw mesh instanced { - if (mesh.indices != NULL) rlDrawVertexArrayElementsInstanced(0, mesh.triangleCount*3, mesh.indices, instances); + if (mesh.indices != NULL) rlDrawVertexArrayElementsInstanced(0, mesh.triangleCount*3, 0, instances); else rlDrawVertexArrayInstanced(0, mesh.vertexCount, instances); } else // Draw mesh { - if (mesh.indices != NULL) rlDrawVertexArrayElements(0, mesh.triangleCount*3, mesh.indices); + if (mesh.indices != NULL) rlDrawVertexArrayElements(0, mesh.triangleCount*3, 0); else rlDrawVertexArray(0, mesh.vertexCount); } }