diff options
| author | raysan5 <[email protected]> | 2021-07-28 13:12:16 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-07-28 13:12:16 +0200 |
| commit | 7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb (patch) | |
| tree | 7b35cd401da92dab666a4b39f77a3ad876f909ab /src | |
| parent | 0c17d1e14f206575f3c328154e205b46cb35a1e3 (diff) | |
| download | raylib-7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb.tar.gz raylib-7c7ee1cdc870d58a58ff196b1e8c119f6a8616cb.zip | |
REVERTED: Mesh indices issue #1891
Diffstat (limited to 'src')
| -rw-r--r-- | src/models.c | 4 |
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); } } |
