mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-26 04:02:06 +00:00
use attrib pointers in nativeVertexFormat
This commit is contained in:
parent
2f78986e2c
commit
ff889c0e65
7 changed files with 51 additions and 41 deletions
|
@ -111,11 +111,21 @@ void ProgramShaderCache::SetProgramBindings ( ProgramShaderCache::PCacheEntry& e
|
|||
|
||||
// Need to set some attribute locations
|
||||
glBindAttribLocation(entry.prog_id, SHADER_POSITION_ATTRIB, "rawpos");
|
||||
|
||||
glBindAttribLocation(entry.prog_id, SHADER_POSMTX_ATTRIB, "fposmtx");
|
||||
glBindAttribLocation(entry.prog_id, SHADER_TEXTURE0_ATTRIB, "texture0");
|
||||
|
||||
glBindAttribLocation(entry.prog_id, SHADER_COLOR0_ATTRIB, "color0");
|
||||
glBindAttribLocation(entry.prog_id, SHADER_COLOR1_ATTRIB, "color1");
|
||||
|
||||
glBindAttribLocation(entry.prog_id, SHADER_NORM0_ATTRIB, "rawnorm0");
|
||||
glBindAttribLocation(entry.prog_id, SHADER_NORM1_ATTRIB, "rawnorm1");
|
||||
glBindAttribLocation(entry.prog_id, SHADER_NORM2_ATTRIB, "rawnorm2");
|
||||
|
||||
for(int i=0; i<8; i++) {
|
||||
char attrib_name[8];
|
||||
snprintf(attrib_name, 8, "tex%d", i);
|
||||
glBindAttribLocation(entry.prog_id, SHADER_TEXTURE0_ATTRIB+i, attrib_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue