BsApplication.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. #include "BsPrerequisites.h"
  3. #include "boost/signals/connection.hpp"
  4. namespace BansheeEngine
  5. {
  6. class BS_EXPORT Application
  7. {
  8. public:
  9. Application();
  10. /**
  11. * @brief Starts the application using the specified options.
  12. * This is how you start the engine.
  13. */
  14. void startUp(CM::RENDER_WINDOW_DESC& primaryWindowDesc, const CM::String& renderSystem, const CM::String& renderer, const CM::String& resourceCacheDir);
  15. /**
  16. * @brief Executes the main loop. This will cause actually rendering to be performed
  17. * and simulation to be run. Usually called immediately after startUp().
  18. */
  19. void runMainLoop();
  20. /**
  21. * @brief Frees up all resources allocated during startUp, and while the application was running.
  22. */
  23. void shutDown();
  24. private:
  25. boost::signals::connection updateCallbackConn;
  26. void update();
  27. };
  28. BS_EXPORT Application& gBansheeApp();
  29. }