mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-06-20 21:43:30 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CShader::IsValidProgram()
|
bool CShader::IsValidProgram() const
|
||||||
{
|
{
|
||||||
return mProgramExists;
|
return mProgramExists;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint CShader::GetProgramID()
|
GLuint CShader::GetProgramID() const
|
||||||
{
|
{
|
||||||
return mProgram;
|
return mProgram;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint CShader::GetUniformLocation(const char* pkUniform)
|
GLuint CShader::GetUniformLocation(const char* pkUniform) const
|
||||||
{
|
{
|
||||||
return glGetUniformLocation(mProgram, pkUniform);
|
return glGetUniformLocation(mProgram, pkUniform);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLuint CShader::GetUniformBlockIndex(const char* pkUniformBlock)
|
GLuint CShader::GetUniformBlockIndex(const char* pkUniformBlock) const
|
||||||
{
|
{
|
||||||
return glGetUniformBlockIndex(mProgram, pkUniformBlock);
|
return glGetUniformBlockIndex(mProgram, pkUniformBlock);
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,10 @@ public:
|
|||||||
bool CompileVertexSource(const char* pkSource);
|
bool CompileVertexSource(const char* pkSource);
|
||||||
bool CompilePixelSource(const char* pkSource);
|
bool CompilePixelSource(const char* pkSource);
|
||||||
bool LinkShaders();
|
bool LinkShaders();
|
||||||
bool IsValidProgram();
|
bool IsValidProgram() const;
|
||||||
GLuint GetProgramID();
|
GLuint GetProgramID() const;
|
||||||
GLuint GetUniformLocation(const char* pkUniform);
|
GLuint GetUniformLocation(const char* pkUniform) const;
|
||||||
GLuint GetUniformBlockIndex(const char* pkUniformBlock);
|
GLuint GetUniformBlockIndex(const char* pkUniformBlock) const;
|
||||||
void UniformBlockBinding(GLuint BlockIndex, GLuint BlockBinding);
|
void UniformBlockBinding(GLuint BlockIndex, GLuint BlockBinding);
|
||||||
void SetTextureUniforms(uint32 NumTextures);
|
void SetTextureUniforms(uint32 NumTextures);
|
||||||
void SetNumLights(uint32 NumLights);
|
void SetNumLights(uint32 NumLights);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user