浏览代码

Updated models.c (#1871)

- fixed issue where vertex positions being passed in place of vertex normals.
pull/1874/head
GoldenThumbs 3 年前
committed by GitHub
父节点
当前提交
59acb6dbea
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/models.c

+ 1
- 1
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);

正在加载...
取消
保存