]> git.tdb.fi Git - libs/demoscene.git/blob - source/beatcounter.h
Allow stages to define actions
[libs/demoscene.git] / source / beatcounter.h
1 #ifndef MSP_DEMOSCENE_BEATCOUNTER_H_
2 #define MSP_DEMOSCENE_BEATCOUNTER_H_
3
4 #include <msp/datafile/collection.h>
5 #include <msp/gl/objectinstance.h>
6 #include <msp/gl/renderable.h>
7 #include <msp/gl/text.h>
8 #include "resources.h"
9 #include "action.h"
10
11 namespace Msp {
12 namespace DemoScene {
13
14 class BeatCounter: public Msp::GL::Renderable, public Action
15 {
16 private:
17         Msp::GL::Text text;
18         Msp::GL::ObjectInstance instance;
19
20 public:
21         BeatCounter(Resources &);
22
23         void set_matrix(const Msp::GL::Matrix &);
24
25         virtual void validate() const { }
26         virtual void beat(int);
27
28         virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
29 };
30
31 } // namespace DemoScene
32 } // namespace Msp
33
34 #endif