Skip to content

Commit d5ffdf3

Browse files
committed
NUKE useless GLUniformBlock::GetName()
1 parent 04668c7 commit d5ffdf3

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/engine/renderer/gl_shader.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,8 @@ class GLUniformMatrix34fv : protected GLUniform
11001100
class GLUniformBlock
11011101
{
11021102
protected:
1103-
GLShader *_shader;
1104-
std::string _name;
1103+
GLShader *_shader;
1104+
const std::string _name;
11051105
size_t _locationIndex; // Only valid if GL_ARB_shading_language_420pack is not available
11061106
const GLuint _bindingPoint; // Only valid if GL_ARB_shading_language_420pack is available
11071107

@@ -1119,14 +1119,9 @@ class GLUniformBlock
11191119
_locationIndex = index;
11201120
}
11211121

1122-
const char *GetName()
1123-
{
1124-
return _name.c_str();
1125-
}
1126-
11271122
void UpdateShaderProgramUniformBlockIndex( ShaderProgramDescriptor* shaderProgram )
11281123
{
1129-
shaderProgram->uniformBlockIndexes[_locationIndex] = glGetUniformBlockIndex( shaderProgram->id, GetName() );
1124+
shaderProgram->uniformBlockIndexes[_locationIndex] = glGetUniformBlockIndex( shaderProgram->id, _name.c_str() );
11301125
}
11311126

11321127
void SetBuffer( GLuint buffer ) {

0 commit comments

Comments
 (0)