]> git.tdb.fi Git - libs/gl.git/blob - demos/forestpond/source/forestpond.h
Begin creating a new demo program
[libs/gl.git] / demos / forestpond / source / forestpond.h
1 #ifndef FORESTPOND_H_
2 #define FORESTPOND_H_
3
4 #include <memory>
5 #include <msp/core/application.h>
6 #include <msp/datafile/directorysource.h>
7 #include <msp/gl/device.h>
8 #include <msp/gl/resourcemanager.h>
9 #include <msp/gl/resources.h>
10 #include <msp/gl/sequence.h>
11 #include <msp/gl/windowview.h>
12 #include <msp/graphics/display.h>
13 #include <msp/graphics/window.h>
14
15 class ForestPond: public Msp::RegisteredApplication<ForestPond>
16 {
17 private:
18         class Resources: public Msp::GL::Resources
19         {
20         private:
21                 Msp::DataFile::DirectorySource source;
22
23         public:
24                 Resources(Msp::GL::ResourceManager *);
25         };
26
27         Msp::Graphics::Display display;
28         Msp::Graphics::Window window;
29         Msp::GL::Device gl_device;
30         Msp::GL::ResourceManager res_mgr;
31         Resources resources;
32
33         Msp::GL::WindowView view;
34         std::unique_ptr<Msp::GL::Sequence> sequence;
35         Msp::GL::Camera &camera;
36
37 public:
38         ForestPond(int, char **);
39
40         virtual int main();
41 private:
42         virtual void tick();
43 };
44
45 #endif