mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-06-20 13:33:28 +00:00
CShader: Mark several functions as const
These don't modify internal member state.
This commit is contained in:
parent
a67df9865e
commit
f44a5fc8d2
@ -160,22 +160,22 @@ bool CShader::LinkShaders()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CShader::IsValidProgram()
|
||||
bool CShader::IsValidProgram() const
|
||||
{
|
||||
return mProgramExists;
|
||||
}
|
||||
|
||||
GLuint CShader::GetProgramID()
|
||||
GLuint CShader::GetProgramID() const
|
||||
{
|
||||
return mProgram;
|
||||
}
|
||||
|
||||
GLuint CShader::GetUniformLocation(const char* pkUniform)
|
||||
GLuint CShader::GetUniformLocation(const char* pkUniform) const
|
||||
{
|
||||
return glGetUniformLocation(mProgram, pkUniform);
|
||||
}
|
||||
|
||||
GLuint CShader::GetUniformBlockIndex(const char* pkUniformBlock)
|
||||
GLuint CShader::GetUniformBlockIndex(const char* pkUniformBlock) const
|
||||
{
|
||||
return glGetUniformBlockIndex(mProgram, pkUniformBlock);
|
||||
}
|
||||
|
@ -35,10 +35,10 @@ public:
|
||||
bool CompileVertexSource(const char* pkSource);
|
||||
bool CompilePixelSource(const char* pkSource);
|
||||
bool LinkShaders();
|
||||
bool IsValidProgram();
|
||||
GLuint GetProgramID();
|
||||
GLuint GetUniformLocation(const char* pkUniform);
|
||||
GLuint GetUniformBlockIndex(const char* pkUniformBlock);
|
||||
bool IsValidProgram() const;
|
||||
GLuint GetProgramID() const;
|
||||
GLuint GetUniformLocation(const char* pkUniform) const;
|
||||
GLuint GetUniformBlockIndex(const char* pkUniformBlock) const;
|
||||
void UniformBlockBinding(GLuint BlockIndex, GLuint BlockBinding);
|
||||
void SetTextureUniforms(uint32 NumTextures);
|
||||
void SetNumLights(uint32 NumLights);
|
||||
|
Loading…
x
Reference in New Issue
Block a user