X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=c8a6fb56720e6950fb0a7bc10097cdcbdf47e62e;hb=bd6bd2c875f4b6baef913e5315aa9f7e7cd7da7a;hp=5148a7a411a30669425b376ee9b73394802510c8;hpb=0a13b3fe342db83eef2c0ddc991a44452df77aa3;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index 5148a7a..c8a6fb5 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 { @@ -14,30 +14,42 @@ namespace blank { class Application { public: - Application(); - ~Application(); + explicit Application(unsigned int seed); 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; - Program program; + DirectionalLighting program; Camera cam; + World world; + Interface interface; - GLuint vtx_buf; - GLuint mvp_handle; + RandomWalk test_controller; bool running;