#ifndef ENGINE_HPP_ #define ENGINE_HPP_ #include #include #include #include #include "ZydecoCommon.hpp" #include "IEventQuitSubscriber.hpp" class IEventHandler; class IWindow; class Engine : public IEventQuitSubscriber { public: Engine(IEventHandler& r_event_handler, IWindow& r_window); ~Engine(); void OnQuitEvent() override; void Execute(); protected: IEventHandler& m_rEventHandler; IWindow& m_rWindow; std::atomic m_aIsExiting; std::atomic m_aSceneUpdated; std::map m_threads; void DoEventLoop(); void DoRenderLoop(); std::chrono::time_point m_currentTime; double m_framerate; std::chrono::microseconds m_frameRenderTimeUs; std::chrono::time_point m_frameRenderStartTime; }; #endif /* ENGINE_HPP_ */