X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=413b6f19869430f22b665d690d4d8a67cd0ff50d;hb=46509f82dcea114b004c53a7f3a9608f2518077f;hp=e525ec632e6459a8612539b6807cfad32549b89c;hpb=e1e349bb6035463529bc341c472987d229e1cdca;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index e525ec6..413b6f1 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -1,12 +1,12 @@ #ifndef BLANK_APP_HPP_ #define BLANK_APP_HPP_ -#include -#include - #include "camera.hpp" +#include "controller.hpp" #include "init.hpp" +#include "interface.hpp" #include "shader.hpp" +#include "world.hpp" namespace blank { @@ -15,17 +15,27 @@ 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(); + static Entity &MakeTestEntity(World &); + private: InitSDL init_sdl; InitIMG init_img; @@ -33,12 +43,13 @@ private: Window window; GLContext ctx; InitGLEW init_glew; - Program program; + DirectionalLighting program; Camera cam; + World world; + Interface interface; - GLuint vtx_buf; - GLuint mvp_handle; + RandomWalk test_controller; bool running;