mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-18 23:42:05 +00:00
PortableVertexFormat: use AttributeFormat for color attribute format
This commit is contained in:
parent
b38ef39ab7
commit
ef2d6e7d53
4 changed files with 12 additions and 16 deletions
|
@ -79,10 +79,7 @@ void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl)
|
|||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (vtx_decl.color_offset[i] != -1) {
|
||||
glEnableVertexAttribArray(SHADER_COLOR0_ATTRIB+i);
|
||||
glVertexAttribPointer(SHADER_COLOR0_ATTRIB+i, 4, GL_UNSIGNED_BYTE, GL_TRUE, vtx_decl.stride, (u8*)NULL + vtx_decl.color_offset[i]);
|
||||
}
|
||||
SetPointer(SHADER_COLOR0_ATTRIB+i, vertex_stride, vtx_decl.colors[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue