summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-07-28 13:12:16 +0200
committerraysan5 <[email protected]>2021-07-28 13:12:16 +0200
commit7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb (patch)
tree7b35cd401da92dab666a4b39f77a3ad876f909ab /src
parent0c17d1e14f206575f3c328154e205b46cb35a1e3 (diff)
downloadraylib-7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb.tar.gz
raylib-7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb.zip
REVERTED: Mesh indices issue #1891
Diffstat (limited to 'src')
-rw-r--r--src/models.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}