浏览代码

Remove redundant rlDisableVertexAttribute for SHADER_LOC_VERTEX_COLOR (#3871)

pull/3880/head
Kacper Zybała 9 个月前
committed by GitHub
父节点
当前提交
9cf408f77c
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 0 次插入6 次删除
  1. +0
    -6
      src/rmodels.c

+ 0
- 6
src/rmodels.c 查看文件

@ -1470,9 +1470,6 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
if (mesh.indices != NULL) rlEnableVertexBufferElement(mesh.vboId[6]);
}
// WARNING: Disable vertex attribute color input if mesh can not provide that data (despite location being enabled in shader)
if (mesh.vboId[3] == 0) rlDisableVertexAttribute(material.shader.locs[SHADER_LOC_VERTEX_COLOR]);
int eyeCount = 1;
if (rlIsStereoRenderEnabled()) eyeCount = 2;
@ -1691,9 +1688,6 @@ void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, i
if (mesh.indices != NULL) rlEnableVertexBufferElement(mesh.vboId[6]);
}
// WARNING: Disable vertex attribute color input if mesh can not provide that data (despite location being enabled in shader)
if (mesh.vboId[3] == 0) rlDisableVertexAttribute(material.shader.locs[SHADER_LOC_VERTEX_COLOR]);
int eyeCount = 1;
if (rlIsStereoRenderEnabled()) eyeCount = 2;

正在加载...
取消
保存