X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=src%2Fapp.hpp;h=cb71411de60e312231f0ac847580f8baf914d579;hb=f01ebd81ff047eb3209e25e183564f72f587915f;hp=9ec5f1f9b7de81c710aa74c9ce60247a995f86ca;hpb=b314df303ffedbd6d2e81872908d12fc9712801a;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index 9ec5f1f..cb71411 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -4,8 +4,13 @@ #include #include +#include "camera.hpp" +#include "controller.hpp" +#include "hud.hpp" #include "init.hpp" +#include "model.hpp" #include "shader.hpp" +#include "world.hpp" namespace blank { @@ -14,31 +19,50 @@ 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(); private: InitSDL init_sdl; + InitIMG init_img; InitGL init_gl; Window window; GLContext ctx; InitGLEW init_glew; - Program program; + DirectionalLighting program; + + Camera cam; + HUD hud; + World world; + FPSController controller; - GLuint vtx_buf; - glm::mat4 mvp; - GLuint mvp_handle; + OutlineModel outline; + bool outline_visible; + glm::mat4 outline_transform; bool running; + bool place, remove, pick; + + int remove_id; + int place_id; + }; }