]> git.localhorst.tv Git - blank.git/blobdiff - src/app.hpp
move human I/O related stuff into separate file
[blank.git] / src / app.hpp
index c5a5098578c306a951c79d0157af6b7ce15c648b..6bd4e0d9a14a65e615eb62f9f14df5f8b33f5c9b 100644 (file)
@@ -1,13 +1,11 @@
 #ifndef BLANK_APP_HPP_
 #define BLANK_APP_HPP_
 
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-
 #include "camera.hpp"
 #include "init.hpp"
-#include "model.hpp"
+#include "interface.hpp"
 #include "shader.hpp"
+#include "world.hpp"
 
 
 namespace blank {
@@ -16,14 +14,21 @@ class Application {
 
 public:
        Application();
-       ~Application();
 
        Application(const Application &) = delete;
        Application &operator =(const Application &) = delete;
 
+       /// run until user quits
        void Run();
        void Loop(int dt);
 
+       /// run for n frames
+       void RunN(size_t n);
+       /// run for t milliseconds
+       void RunT(size_t t);
+       /// run for n frames, assuming t milliseconds for each
+       void RunS(size_t n, size_t t);
+
        void HandleEvents();
        void Update(int dt);
        void Render();
@@ -35,22 +40,14 @@ private:
        Window window;
        GLContext ctx;
        InitGLEW init_glew;
-       Program program;
-
-       float move_velocity;
-       float pitch_sensitivity;
-       float yaw_sensitivity;
+       DirectionalLighting program;
 
        Camera cam;
-       Model model;
-
-       GLuint vtx_buf;
-       GLuint mvp_handle;
+       World world;
+       Interface interface;
 
        bool running;
 
-       bool front, back, left, right, up, down;
-
 };
 
 }