From 56beca9d8b4f7b4edac81411d31e24df88e84ac3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 10 Jul 2019 01:51:37 +0300 Subject: [PATCH] Add functions for setting arrays of 2x2 and 3x3 matrix uniforms --- source/programdata.cpp | 10 ++++++++++ source/programdata.h | 2 ++ 2 files changed, 12 insertions(+) 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 &); -- 2.45.2