]> git.localhorst.tv Git - blank.git/blobdiff - src/app.hpp
noexcept all the things
[blank.git] / src / app.hpp
index cb71411de60e312231f0ac847580f8baf914d579..e6226dc50454dff487aa8596460b68dcfdf0670a 100644 (file)
@@ -1,14 +1,10 @@
 #ifndef BLANK_APP_HPP_
 #define BLANK_APP_HPP_
 
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-
 #include "camera.hpp"
 #include "controller.hpp"
-#include "hud.hpp"
 #include "init.hpp"
-#include "model.hpp"
+#include "interface.hpp"
 #include "shader.hpp"
 #include "world.hpp"
 
@@ -18,7 +14,16 @@ namespace blank {
 class Application {
 
 public:
-       Application();
+       struct Config {
+               bool vsync = true;
+               bool doublebuf = true;
+               int multisampling = 1;
+
+               Interface::Config interface = Interface::Config();
+               World::Config world = World::Config();
+       };
+
+       explicit Application(const Config &);
 
        Application(const Application &) = delete;
        Application &operator =(const Application &) = delete;
@@ -38,6 +43,8 @@ public:
        void Update(int dt);
        void Render();
 
+       static Entity &MakeTestEntity(World &);
+
 private:
        InitSDL init_sdl;
        InitIMG init_img;
@@ -45,24 +52,17 @@ private:
        Window window;
        GLContext ctx;
        InitGLEW init_glew;
-       DirectionalLighting program;
+       BlockLighting chunk_prog;
+       DirectionalLighting entity_prog;
 
        Camera cam;
-       HUD hud;
        World world;
-       FPSController controller;
+       Interface interface;
 
-       OutlineModel outline;
-       bool outline_visible;
-       glm::mat4 outline_transform;
+       RandomWalk test_controller;
 
        bool running;
 
-       bool place, remove, pick;
-
-       int remove_id;
-       int place_id;
-
 };
 
 }