Change shader parameter names
This commit is contained in:
@@ -48,18 +48,18 @@ namespace Inferno {
|
||||
glUniform1i(location, value);
|
||||
}
|
||||
|
||||
void Shader::setFloat(const std::string &name, float f1) const
|
||||
void Shader::setFloat(const std::string &name, float value) const
|
||||
{
|
||||
// Set uniform float
|
||||
GLint location = glGetUniformLocation(m_program, name.c_str());
|
||||
glUniform1f(location, f1);
|
||||
glUniform1f(location, value);
|
||||
}
|
||||
|
||||
void Shader::setFloat(const std::string &name, float f1, float f2, float f3, float f4) const
|
||||
void Shader::setFloat(const std::string &name, float v1, float v2, float v3, float v4) const
|
||||
{
|
||||
// Set uniform vec4 data
|
||||
GLint location = glGetUniformLocation(m_program, name.c_str());
|
||||
glUniform4f(location, f1, f2, f3, f4);
|
||||
glUniform4f(location, v1, v2, v3, v4);
|
||||
}
|
||||
|
||||
void Shader::setFloat(const std::string &name, glm::vec2 value) const
|
||||
|
||||
@@ -17,13 +17,13 @@ namespace Inferno {
|
||||
|
||||
// Set uniform data
|
||||
void setInt(const std::string& name, int value);
|
||||
void setFloat(const std::string &name, float f1) const;
|
||||
void setFloat(const std::string &name, float f1, float f2, float f3, float f4) const;
|
||||
void setFloat(const std::string &name, glm::vec2 v) const;
|
||||
void setFloat(const std::string &name, glm::vec3 v) const;
|
||||
void setFloat(const std::string &name, glm::vec4 v) const;
|
||||
void setFloat(const std::string &name, glm::mat3 m) const;
|
||||
void setFloat(const std::string &name, glm::mat4 m) const;
|
||||
void setFloat(const std::string &name, float value) const;
|
||||
void setFloat(const std::string &name, float v1, float v2, float v3, float v4) const;
|
||||
void setFloat(const std::string &name, glm::vec2 value) const;
|
||||
void setFloat(const std::string &name, glm::vec3 value) const;
|
||||
void setFloat(const std::string &name, glm::vec4 value) const;
|
||||
void setFloat(const std::string &name, glm::mat3 matrix) const;
|
||||
void setFloat(const std::string &name, glm::mat4 matrix) const;
|
||||
|
||||
// -----------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user