X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=6bd4e0d9a14a65e615eb62f9f14df5f8b33f5c9b;hb=9eb7fb38870c6324580683752d49d62b7a431bce;hp=8c6d792bdd48f63041b9068a44c303737be8fd28;hpb=2d8c7c015478a4528c0909f11d43998b1393948d;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index 8c6d792..6bd4e0d 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -1,13 +1,9 @@ #ifndef BLANK_APP_HPP_ #define BLANK_APP_HPP_ -#include -#include - #include "camera.hpp" -#include "controller.hpp" #include "init.hpp" -#include "model.hpp" +#include "interface.hpp" #include "shader.hpp" #include "world.hpp" @@ -18,14 +14,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(); @@ -37,37 +40,14 @@ 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; - - 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; + World world; + Interface interface; bool running; - bool front, back, left, right, up, down; - }; }