From: Mikko Rasa Date: Tue, 9 Jul 2019 22:51:37 +0000 (+0300) Subject: Add functions for setting arrays of 2x2 and 3x3 matrix uniforms X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=56beca9d8b4f7b4edac81411d31e24df88e84ac3;p=libs%2Fgl.git Add functions for setting arrays of 2x2 and 3x3 matrix uniforms --- diff --git a/source/programdata.cpp b/source/programdata.cpp index 79a8bb1b..cd12c2ca 100644 --- a/source/programdata.cpp +++ b/source/programdata.cpp @@ -271,6 +271,16 @@ void ProgramData::uniform4_array(const string &name, unsigned n, const float *v) uniform(name, new UniformArray(n, v)); } +void ProgramData::uniform_matrix2_array(const string &name, unsigned n, const float *v) +{ + uniform(name, new UniformArray(n, v)); +} + +void ProgramData::uniform_matrix3_array(const string &name, unsigned n, const float *v) +{ + uniform(name, new UniformArray(n, v)); +} + void ProgramData::uniform_matrix4_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 743e3c0f..f11a254c 100644 --- a/source/programdata.h +++ b/source/programdata.h @@ -173,6 +173,8 @@ public: void uniform3_array(const std::string &, unsigned, const float *); void uniform4_array(const std::string &, unsigned, const int *); void uniform4_array(const std::string &, unsigned, const float *); + void uniform_matrix2_array(const std::string &, unsigned, const float *); + void uniform_matrix3_array(const std::string &, unsigned, const float *); void uniform_matrix4_array(const std::string &, unsigned, const float *); void remove_uniform(const std::string &);