diff --git a/src/models.c b/src/models.c index c6637139..18ae48d1 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); } }