X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;fp=src%2Fapp.hpp;h=0000000000000000000000000000000000000000;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=e6226dc50454dff487aa8596460b68dcfdf0670a;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/app.hpp b/src/app.hpp deleted file mode 100644 index e6226dc..0000000 --- a/src/app.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef BLANK_APP_HPP_ -#define BLANK_APP_HPP_ - -#include "camera.hpp" -#include "controller.hpp" -#include "init.hpp" -#include "interface.hpp" -#include "shader.hpp" -#include "world.hpp" - - -namespace blank { - -class Application { - -public: - 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; - - /// 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(); - - 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; - World world; - Interface interface; - - RandomWalk test_controller; - - bool running; - -}; - -} - -#endif