summaryrefslogtreecommitdiffhomepage
path: root/src/models.c
diff options
context:
space:
mode:
authorGoldenThumbs <[email protected]>2021-07-13 05:18:52 -0500
committerGitHub <[email protected]>2021-07-13 12:18:52 +0200
commit59acb6dbea44070e8b268f6946755eca2f85ba57 (patch)
tree90dfb59b6dbeac779e70386cb36cd2681140b416 /src/models.c
parent8277597bcf5dbfa1149d9a0dcefac671fc55d703 (diff)
downloadraylib-59acb6dbea44070e8b268f6946755eca2f85ba57.tar.gz
raylib-59acb6dbea44070e8b268f6946755eca2f85ba57.zip
Updated models.c (#1871)
- fixed issue where vertex positions being passed in place of vertex normals.
Diffstat (limited to 'src/models.c')
-rw-r--r--src/models.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/models.c b/src/models.c
index 532dd178..83d4562d 100644
--- a/src/models.c
+++ b/src/models.c
@@ -860,7 +860,7 @@ void UploadMesh(Mesh *mesh, bool dynamic)
if (mesh->normals != NULL)
{
// Enable vertex attributes: normals (shader-location = 2)
- void *normals = mesh->animNormals != NULL ? mesh->animNormals : mesh->vertices;
+ void *normals = mesh->animNormals != NULL ? mesh->animNormals : mesh->normals;
mesh->vboId[2] = rlLoadVertexBuffer(normals, mesh->vertexCount*3*sizeof(float), dynamic);
rlSetVertexAttribute(2, 3, RL_FLOAT, 0, 0, 0);
rlEnableVertexAttribute(2);