X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=cb71411de60e312231f0ac847580f8baf914d579;hb=e70967c971f77a4ac0f5c074e6eb94bdd0e2b7ab;hp=28c7536e440ec781926eb7af2b8a8099e4bfe6ed;hpb=8881c507009521d08648560984c0f50166224542;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index 28c7536..cb71411 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -6,6 +6,7 @@ #include "camera.hpp" #include "controller.hpp" +#include "hud.hpp" #include "init.hpp" #include "model.hpp" #include "shader.hpp" @@ -22,9 +23,17 @@ public: 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(); @@ -36,36 +45,19 @@ private: Window window; GLContext ctx; InitGLEW init_glew; - Program program; - - float move_velocity; - float pitch_sensitivity; - float yaw_sensitivity; - - BlockTypeRegistry blockType; + DirectionalLighting program; Camera cam; - Chunk chunk; - OutlineModel outline; + HUD hud; + World world; + FPSController controller; + OutlineModel outline; bool outline_visible; glm::mat4 outline_transform; - glm::vec3 light_position; - glm::vec3 light_color; - float light_power; - - GLuint m_handle; - GLuint v_handle; - GLuint mv_handle; - GLuint mvp_handle; - GLuint light_position_handle; - GLuint light_color_handle; - GLuint light_power_handle; - bool running; - bool front, back, left, right, up, down; bool place, remove, pick; int remove_id;