]> git.tdb.fi Git - libs/gl.git/commitdiff
Add functions for setting arrays of 2x2 and 3x3 matrix uniforms
authorMikko Rasa <tdb@tdb.fi>
Tue, 9 Jul 2019 22:51:37 +0000 (01:51 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 9 Jul 2019 22:51:37 +0000 (01:51 +0300)
source/programdata.cpp
source/programdata.h

index 79a8bb1bd98fe434542504487bdcf5f23b047e50..cd12c2ca47fbff99cdbfe2578d30ebbd0468d997 100644 (file)
@@ -271,6 +271,16 @@ void ProgramData::uniform4_array(const string &name, unsigned n, const float *v)
        uniform(name, new UniformArray<Uniform4f>(n, v));
 }
 
+void ProgramData::uniform_matrix2_array(const string &name, unsigned n, const float *v)
+{
+       uniform(name, new UniformArray<UniformMatrix2x2f>(n, v));
+}
+
+void ProgramData::uniform_matrix3_array(const string &name, unsigned n, const float *v)
+{
+       uniform(name, new UniformArray<UniformMatrix3x3f>(n, v));
+}
+
 void ProgramData::uniform_matrix4_array(const string &name, unsigned n, const float *v)
 {
        uniform(name, new UniformArray<UniformMatrix4x4f>(n, v));
index 743e3c0f0e2804461128f05f5314e20d326ade44..f11a254cb8014e5ec9a341f5c695c5685b7c802c 100644 (file)
@@ -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 &);