BsApplication.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPrerequisites.h"
  5. #include "BsCoreApplication.h"
  6. #include "BsEngineConfig.h"
  7. #include "BsEvent.h"
  8. namespace BansheeEngine
  9. {
  10. /** @addtogroup Application-Engine
  11. * @{
  12. */
  13. /** Primary entry point for Banshee engine. Handles startup and shutdown. */
  14. class BS_EXPORT Application : public CoreApplication
  15. {
  16. public:
  17. Application(const START_UP_DESC& desc);
  18. virtual ~Application();
  19. /** Starts the Banshee engine. */
  20. static void startUp(const START_UP_DESC& desc);
  21. /** Returns the absolute path to the builtin managed engine assembly file. */
  22. Path getEngineAssemblyPath() const;
  23. /** Returns the absolute path to the game managed assembly file. */
  24. Path getGameAssemblyPath() const;
  25. /** Returns the absolute path to the folder where script assemblies are located in. */
  26. virtual Path getScriptAssemblyFolder() const;
  27. protected:
  28. /** @copydoc Module::onStartUp */
  29. void onStartUp() override;
  30. /** @copydoc Module::onShutDown */
  31. void onShutDown() override;
  32. /** @copydoc CoreApplication::preUpdate */
  33. void preUpdate() override;
  34. /** @copydoc CoreApplication::postUpdate */
  35. void postUpdate() override;
  36. /** @copydoc CoreApplication::startUpRenderer */
  37. void startUpRenderer() override;
  38. /** @copydoc CoreApplication::getShaderIncludeHandler */
  39. SPtr<IShaderIncludeHandler> getShaderIncludeHandler() const override;
  40. /** Loads the script system and all script libraries. */
  41. virtual void loadScriptSystem();
  42. /** Unloads script libraries and shuts down the script system. */
  43. virtual void unloadScriptSystem();
  44. /** Returns the absolute path to the folder where built-in assemblies are located in. */
  45. virtual Path getBuiltinAssemblyFolder() const;
  46. DynLib* mMonoPlugin;
  47. DynLib* mSBansheeEnginePlugin;
  48. };
  49. /** Easy way to access Application. */
  50. BS_EXPORT Application& gApplication();
  51. /** @} */
  52. }