瀏覽代碼

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

Loading…
取消
儲存