From: Mikko Rasa Date: Mon, 3 Sep 2012 10:19:13 +0000 (+0300) Subject: Rename the matrix reference version of uniform_matrix4 to uniform X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a8b400939e1325ed1efeb697771ba38156729d00;p=libs%2Fgl.git Rename the matrix reference version of uniform_matrix4 to uniform This is more in line with the other uniform setters, which don't have any type suffix when given an argument from which the type is apparent. --- diff --git a/source/programdata.cpp b/source/programdata.cpp index 1ecd3a1d..ded9f8a7 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -129,18 +129,18 @@ void ProgramData::uniform_matrix3(const string &name, const float *v) uniform(name, new UniformMatrix3x3f(v)); } -void ProgramData::uniform_matrix4(const string &name, const float *v) -{ - uniform(name, new UniformMatrix4x4f(v)); -} - -void ProgramData::uniform_matrix4(const string &name, const Matrix &m) +void ProgramData::uniform(const string &name, const Matrix &m) { float v[16]; copy(m.data(), m.data()+16, v); uniform_matrix4(name, v); } +void ProgramData::uniform_matrix4(const string &name, const float *v) +{ + uniform(name, new UniformMatrix4x4f(v)); +} + void ProgramData::uniform1_array(const string &name, unsigned n, const float *v) { uniform(name, new UniformArray(n, v)); diff --git a/source/programdata.h b/source/programdata.h index 3cef2d4c..39b44583 100644 --- a/source/programdata.h +++ b/source/programdata.h @@ -89,8 +89,8 @@ public: void uniform4(const std::string &, const float *); void uniform_matrix2(const std::string &, const float *); void uniform_matrix3(const std::string &, const float *); + void uniform(const std::string &, const Matrix &); void uniform_matrix4(const std::string &, const float *); - void uniform_matrix4(const std::string &, const Matrix &); void uniform1_array(const std::string &, unsigned, const float *); void uniform2_array(const std::string &, unsigned, const float *); void uniform3_array(const std::string &, unsigned, const float *);