BsApplication.h 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "BsPrerequisites.h"
  3. #include "boost/signals/connection.hpp"
  4. namespace BansheeEngine
  5. {
  6. class BS_EXPORT BsApplication
  7. {
  8. public:
  9. BsApplication();
  10. /**
  11. * @brief Starts the application using the specified options.
  12. * This is how you start the engine.
  13. */
  14. void startUp(RENDER_WINDOW_DESC& primaryWindowDesc, const String& renderSystem, const String& renderer);
  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. const ViewportPtr& getPrimaryViewport() const;
  25. private:
  26. boost::signals::connection updateCallbackConn;
  27. DynLib* mMonoPlugin;
  28. DynLib* mSBansheeEnginePlugin;
  29. void update();
  30. };
  31. BS_EXPORT BsApplication& gBansheeApp();
  32. }