]> git.tdb.fi Git - libs/gl.git/blobdiff - demos/forestpond/source/forestpond.h
Begin creating a new demo program
[libs/gl.git] / demos / forestpond / source / forestpond.h
diff --git a/demos/forestpond/source/forestpond.h b/demos/forestpond/source/forestpond.h
new file mode 100644 (file)
index 0000000..b626f4e
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef FORESTPOND_H_
+#define FORESTPOND_H_
+
+#include <memory>
+#include <msp/core/application.h>
+#include <msp/datafile/directorysource.h>
+#include <msp/gl/device.h>
+#include <msp/gl/resourcemanager.h>
+#include <msp/gl/resources.h>
+#include <msp/gl/sequence.h>
+#include <msp/gl/windowview.h>
+#include <msp/graphics/display.h>
+#include <msp/graphics/window.h>
+
+class ForestPond: public Msp::RegisteredApplication<ForestPond>
+{
+private:
+       class Resources: public Msp::GL::Resources
+       {
+       private:
+               Msp::DataFile::DirectorySource source;
+
+       public:
+               Resources(Msp::GL::ResourceManager *);
+       };
+
+       Msp::Graphics::Display display;
+       Msp::Graphics::Window window;
+       Msp::GL::Device gl_device;
+       Msp::GL::ResourceManager res_mgr;
+       Resources resources;
+
+       Msp::GL::WindowView view;
+       std::unique_ptr<Msp::GL::Sequence> sequence;
+       Msp::GL::Camera &camera;
+
+public:
+       ForestPond(int, char **);
+
+       virtual int main();
+private:
+       virtual void tick();
+};
+
+#endif