summaryrefslogtreecommitdiffhomepage
path: root/src/models.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2021-07-27 23:35:54 +0200
committerraysan5 <[email protected]>2021-07-27 23:35:54 +0200
commite9c7ab925fe3fb8530389f0e554496bdf3fa6ce9 (patch)
tree08c6d29ca5a14ea96dac2c8ce395ce04f470668b /src/models.c
parent70ed52dd5d972a33268b603930ffbb9e1338da24 (diff)
downloadraylib-e9c7ab925fe3fb8530389f0e554496bdf3fa6ce9.tar.gz
raylib-e9c7ab925fe3fb8530389f0e554496bdf3fa6ce9.zip
REVIEWED: rlDrawVertexArrayElements() #1891
Diffstat (limited to 'src/models.c')
-rw-r--r--src/models.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/models.c b/src/models.c
index 856d334d..c6637139 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, 0, instances);
+ if (mesh.indices != NULL) rlDrawVertexArrayElementsInstanced(0, mesh.triangleCount*3, mesh.indices, instances);
else rlDrawVertexArrayInstanced(0, mesh.vertexCount, instances);
}
else // Draw mesh
{
- if (mesh.indices != NULL) rlDrawVertexArrayElements(0, mesh.triangleCount*3, 0);
+ if (mesh.indices != NULL) rlDrawVertexArrayElements(0, mesh.triangleCount*3, mesh.indices);
else rlDrawVertexArray(0, mesh.vertexCount);
}
}
@@ -4397,12 +4397,12 @@ static void *ReadGLTFValuesAs(cgltf_accessor* acc, cgltf_component_type type, bo
} break;
case cgltf_component_type_r_32f:
{
- float* typedArray = (float*) array;
+ float *typedArray = (float *)array;
for (unsigned int i = 0; i < count*typeElements; i++) typedArray[i] = (float)typedAdditionalArray[i];
} break;
case cgltf_component_type_r_32u:
{
- unsigned int* typedArray = (unsigned int*) array;
+ unsigned int *typedArray = (unsigned int *)array;
for (unsigned int i = 0; i < count*typeElements; i++) typedArray[i] = (unsigned int)typedAdditionalArray[i];
} break;
default: