]> git.tdb.fi Git - libs/demoscene.git/commitdiff
Allow setting matrix for the beat counter
authorMikko Rasa <tdb@tdb.fi>
Sat, 8 Jun 2019 14:34:26 +0000 (17:34 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 8 Jun 2019 14:34:26 +0000 (17:34 +0300)
source/beatcounter.cpp
source/beatcounter.h

index d914c201790c279e116ae0e627bebde2f79afe5d..2798056753d5f4b9810c733cb6957ad446f8442a 100644 (file)
@@ -9,7 +9,11 @@ BeatCounter::BeatCounter(Resources &resources):
        instance(text)
 {
        text.set_alignment(GL::Text::CENTER);
-       instance.set_matrix(GL::Matrix::scaling(0.02f));
+}
+
+void BeatCounter::set_matrix(const GL::Matrix &m)
+{
+       instance.set_matrix(m);
 }
 
 void BeatCounter::beat(int b)
index 98af61b025bb9b12d0c31eb5810ed4726c7959a1..ed0dd27609cfe1c071e24f035e8958d75c96565c 100644 (file)
@@ -20,8 +20,9 @@ private:
 public:
        BeatCounter(Resources &);
 
-       virtual void validate() const { }
+       void set_matrix(const Msp::GL::Matrix &);
 
+       virtual void validate() const { }
        virtual void beat(int);
 
        virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;