瀏覽代碼

Normals was not correctly updated when using animated meshes (#1052)

* Normal vbo not correctly updated
pull/1057/head
las3rlars 5 年之前
committed by Ray
父節點
當前提交
f8bd56b07f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/models.c

+ 1
- 1
src/models.c 查看文件

@ -1164,7 +1164,7 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
// Upload new vertex data to GPU for model drawing
rlUpdateBuffer(model.meshes[m].vboId[0], model.meshes[m].animVertices, model.meshes[m].vertexCount*3*sizeof(float)); // Update vertex position
rlUpdateBuffer(model.meshes[m].vboId[2], model.meshes[m].animVertices, model.meshes[m].vertexCount*3*sizeof(float)); // Update vertex normals
rlUpdateBuffer(model.meshes[m].vboId[2], model.meshes[m].animNormals, model.meshes[m].vertexCount*3*sizeof(float)); // Update vertex normals
}
}
}

Loading…
取消
儲存