Parcourir la source

Updated models.c (#1871)

- fixed issue where vertex positions being passed in place of vertex normals.
pull/1874/head
GoldenThumbs il y a 4 ans
committed by GitHub
Parent
révision
59acb6dbea
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      src/models.c

+ 1
- 1
src/models.c Voir le fichier

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

Chargement…
Annuler
Enregistrer