X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp.hpp;h=413b6f19869430f22b665d690d4d8a67cd0ff50d;hb=46509f82dcea114b004c53a7f3a9608f2518077f;hp=f3ee1410f5ee405a29e2a01b25fb2ab091fa4969;hpb=3baab6cca7423d55ea08288d96570b02380b1fe9;p=blank.git diff --git a/src/app.hpp b/src/app.hpp index f3ee141..413b6f1 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -1,14 +1,12 @@ #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" namespace blank { @@ -17,18 +15,27 @@ 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(); + static Entity &MakeTestEntity(World &); + private: InitSDL init_sdl; InitIMG init_img; @@ -36,32 +43,16 @@ private: Window window; GLContext ctx; InitGLEW init_glew; - Program program; - - float move_velocity; - float pitch_sensitivity; - float yaw_sensitivity; + DirectionalLighting program; Camera cam; - Model model; - FPSController modelCtrl; - - glm::vec3 light_position; - glm::vec3 light_color; - float light_power; + World world; + Interface interface; - GLuint m_handle; - GLuint v_handle; - GLuint mv_handle; - GLuint mvp_handle; - GLuint light_position_handle; - GLuint light_color_handle; - GLuint light_power_handle; + RandomWalk test_controller; bool running; - bool front, back, left, right, up, down; - }; }