Getting rid of useless code for cg shaders.
This commit is contained in:
@@ -209,14 +209,6 @@ Shader::create(const char **vsrc, const char **fsrc)
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
// set uniform block binding
|
||||
for(i = 0; i < uniformRegistry.numBlocks; i++){
|
||||
int idx = glGetUniformBlockIndex(program,
|
||||
uniformRegistry.blockNames[i]);
|
||||
if(idx >= 0)
|
||||
glUniformBlockBinding(program, idx, i);
|
||||
}
|
||||
|
||||
// query uniform locations
|
||||
sh->program = program;
|
||||
sh->uniformLocations = rwNewT(GLint, uniformRegistry.numUniforms, MEMDUR_EVENT | ID_DRIVER);
|
||||
@@ -226,13 +218,6 @@ Shader::create(const char **vsrc, const char **fsrc)
|
||||
|
||||
// set samplers
|
||||
glUseProgram(program);
|
||||
char name[64];
|
||||
GLint loc;
|
||||
for(i = 0; i < 4; i++){
|
||||
sprintf(name, "tex%d", i);
|
||||
loc = glGetUniformLocation(program, name);
|
||||
glUniform1i(loc, i);
|
||||
}
|
||||
|
||||
// reset program
|
||||
if(currentShader)
|
||||
|
||||
Reference in New Issue
Block a user