- change ShaderUniforms so that it just contains the uniform block and not the binding point
This commit is contained in:
parent
49073489e5
commit
9155b773cc
13 changed files with 59 additions and 41 deletions
|
|
@ -159,6 +159,19 @@ void FShaderProgram::SetAttribLocation(int index, const char *name)
|
|||
glBindAttribLocation(mProgram, index, name);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Set uniform buffer location
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FShaderProgram::SetUniformBufferLocation(int index, const char *name)
|
||||
{
|
||||
GLuint uniformBlockIndex = glGetUniformBlockIndex(mProgram, name);
|
||||
if (uniformBlockIndex != GL_INVALID_INDEX)
|
||||
glUniformBlockBinding(mProgram, uniformBlockIndex, index);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Makes the shader the active program
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue