Merge branch 'raysan5:master' into master

This commit is contained in:
Luiz Pestana 2021-07-27 21:18:49 -03:00 committed by GitHub
commit b5212e216c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 16 deletions

View File

@ -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);
}
}

View File

@ -1422,7 +1422,7 @@ RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
Quaternion result = { 0.0f, 0.0f, 0.0f, 1.0f };
if (Vector3Length(axis) != 0.0f)
{
angle *= 0.5f;
axis = Vector3Normalize(axis);
@ -1436,6 +1436,7 @@ RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
result.w = cosres;
result = QuaternionNormalize(result);
}
return result;
}