rename GLProgram::operator[]() to GLProgram::get_uniform()

This commit is contained in:
Josh Holtrop 2014-06-23 16:24:00 -04:00
parent 5403d13f6a
commit f75cd9d4ad
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ namespace jes
return true; return true;
} }
GLint GLProgram::operator[](const std::string & uniform_name) GLint GLProgram::get_uniform(const std::string & uniform_name)
{ {
if (m_id > 0u) if (m_id > 0u)
{ {

View File

@ -19,7 +19,7 @@ namespace jes
bool link(); bool link();
GLuint get_id() { return m_id; } GLuint get_id() { return m_id; }
void use() { glUseProgram(m_id); } void use() { glUseProgram(m_id); }
GLint operator[](const std::string & uniform_name); GLint get_uniform(const std::string & uniform_name);
protected: protected:
GLuint m_id; GLuint m_id;
std::map<std::string, GLint> m_uniforms; std::map<std::string, GLint> m_uniforms;