]> git.tdb.fi Git - libs/gl.git/blob - demos/forestpond/source/forestpond.h
Implement water simulation and surface shader for forest pond
[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/orderedscene.h>
9 #include <msp/gl/resourcemanager.h>
10 #include <msp/gl/resources.h>
11 #include <msp/gl/sequence.h>
12 #include <msp/gl/windowview.h>
13 #include <msp/graphics/display.h>
14 #include <msp/graphics/window.h>
15 #include "water.h"
16
17 class ForestPond: public Msp::RegisteredApplication<ForestPond>
18 {
19 private:
20         class Resources: public Msp::GL::Resources
21         {
22         private:
23                 Msp::DataFile::DirectorySource source;
24
25         public:
26                 Resources(Msp::GL::ResourceManager *);
27         };
28
29         Msp::Graphics::Display display;
30         Msp::Graphics::Window window;
31         Msp::GL::Device gl_device;
32         Msp::GL::ResourceManager res_mgr;
33         Resources resources;
34
35         Msp::GL::WindowView view;
36         std::unique_ptr<Msp::GL::Sequence> sequence;
37         Msp::GL::Camera &camera;
38
39         Msp::GL::OrderedScene content;
40         Water water;
41
42 public:
43         ForestPond(int, char **);
44
45         virtual int main();
46 private:
47         virtual void tick();
48 };
49
50 #endif