]> git.localhorst.tv Git - blank.git/blobdiff - src/app/Application.hpp
move font color from texture to uniform
[blank.git] / src / app / Application.hpp
index c8236ffbf27a72281364c87a69454103845a358a..a8e0f2d00f3fdafda8df72d5533e4f86cbfe7c3c 100644 (file)
@@ -1,14 +1,16 @@
 #ifndef BLANK_APP_APPLICATION_HPP_
 #define BLANK_APP_APPLICATION_HPP_
 
+#include "Assets.hpp"
+#include "FrameCounter.hpp"
 #include "init.hpp"
 #include "RandomWalk.hpp"
-#include "../graphics/BlockLighting.hpp"
-#include "../graphics/Camera.hpp"
-#include "../graphics/DirectionalLighting.hpp"
+#include "../graphics/Viewport.hpp"
 #include "../ui/Interface.hpp"
 #include "../world/World.hpp"
 
+#include <SDL.h>
+
 
 namespace blank {
 
@@ -31,6 +33,7 @@ public:
 
        /// run until user quits
        void Run();
+       /// evaluate a single frame of dt milliseconds
        void Loop(int dt);
 
        /// run for n frames
@@ -40,23 +43,22 @@ public:
        /// run for n frames, assuming t milliseconds for each
        void RunS(size_t n, size_t t);
 
+       /// process all events in SDL's queue
        void HandleEvents();
+       void Handle(const SDL_WindowEvent &);
+       /// integrate to the next step with dt milliseconds passed
        void Update(int dt);
+       /// push the current state to display
        void Render();
 
        static Entity &MakeTestEntity(World &);
 
 private:
-       InitSDL init_sdl;
-       InitIMG init_img;
-       InitGL init_gl;
-       Window window;
-       GLContext ctx;
-       InitGLEW init_glew;
-       BlockLighting chunk_prog;
-       DirectionalLighting entity_prog;
-
-       Camera cam;
+       Init init;
+       Viewport viewport;
+       Assets assets;
+       FrameCounter counter;
+
        World world;
        Interface interface;