]> git.localhorst.tv Git - blank.git/blobdiff - src/app.hpp
use light levels for shading of blocks
[blank.git] / src / app.hpp
index 6bd4e0d9a14a65e615eb62f9f14df5f8b33f5c9b..e6226dc50454dff487aa8596460b68dcfdf0670a 100644 (file)
@@ -2,6 +2,7 @@
 #define BLANK_APP_HPP_
 
 #include "camera.hpp"
+#include "controller.hpp"
 #include "init.hpp"
 #include "interface.hpp"
 #include "shader.hpp"
@@ -13,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;
@@ -33,6 +43,8 @@ public:
        void Update(int dt);
        void Render();
 
+       static Entity &MakeTestEntity(World &);
+
 private:
        InitSDL init_sdl;
        InitIMG init_img;
@@ -40,12 +52,15 @@ private:
        Window window;
        GLContext ctx;
        InitGLEW init_glew;
-       DirectionalLighting program;
+       BlockLighting chunk_prog;
+       DirectionalLighting entity_prog;
 
        Camera cam;
        World world;
        Interface interface;
 
+       RandomWalk test_controller;
+
        bool running;
 
 };