Updated shader convention

Vertex input are now prefixed by "Vertex" (VertexPosition, VertexNormal,
..)
Same for Material input (MaterialAmbientColor, MaterialShininess, ...)


Former-commit-id: 1fbf8b8b32546a21ee23ff83714c860a9a8fce4f
This commit is contained in:
Lynix
2013-01-05 23:52:41 +01:00
parent 492d01cc09
commit c93e8eb585
3 changed files with 22 additions and 22 deletions

View File

@@ -111,14 +111,14 @@ bool NzGLSLShader::Create()
return false;
}
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Position], "Position");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Normal], "Normal");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Diffuse], "Diffuse");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Tangent], "Tangent");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Position], "VertexPosition");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Normal], "VertexNormal");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Diffuse], "VertexDiffuse");
glBindAttribLocation(m_program, NzOpenGL::AttributeIndex[nzElementUsage_Tangent], "VertexTangent");
NzString uniform;
uniform.Reserve(10); // 8 + 2
uniform = "TexCoord";
uniform.Reserve(16); // 14 + 2
uniform = "VertexTexCoord";
unsigned int maxTexCoords = NzRenderer::GetMaxTextureUnits();
for (unsigned int i = 0; i < maxTexCoords; ++i)