X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=cb71411de60e312231f0ac847580f8baf914d579;hb=f01ebd81ff047eb3209e25e183564f72f587915f;hp=d949567347f336e978fd62d7f15a1871140b49a1;hpb=81531352f0af10ef357e82595098fa596795f000;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index d949567..cb71411 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -6,8 +6,11 @@ #include "camera.hpp" #include "controller.hpp" +#include "hud.hpp" #include "init.hpp" +#include "model.hpp" #include "shader.hpp" +#include "world.hpp" namespace blank { @@ -16,14 +19,21 @@ 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(); @@ -35,21 +45,23 @@ private: Window window; GLContext ctx; InitGLEW init_glew; - Program program; - - float move_velocity; - float pitch_sensitivity; - float yaw_sensitivity; + DirectionalLighting program; Camera cam; - FPSController model; + HUD hud; + World world; + FPSController controller; - GLuint vtx_buf; - GLuint mvp_handle; + OutlineModel outline; + bool outline_visible; + glm::mat4 outline_transform; bool running; - bool front, back, left, right, up, down; + bool place, remove, pick; + + int remove_id; + int place_id; };