| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsPrerequisites.h"
- #include "BsCoreApplication.h"
- #include "BsEvent.h"
- namespace BansheeEngine
- {
- /** @addtogroup Application-Engine
- * @{
- */
- /** Types of available render systems. */
- enum class RenderAPIPlugin
- {
- DX11,
- DX9,
- OpenGL
- };
- /** Types of available renderers. */
- enum class RendererPlugin
- {
- Default
- };
- /** Primary entry point for Banshee engine. Handles startup and shutdown. */
- class BS_EXPORT Application : public CoreApplication
- {
- public:
- Application(RENDER_WINDOW_DESC primaryWindowDesc, RenderAPIPlugin renderAPI, RendererPlugin renderer,
- const Vector<String>& importers);
- virtual ~Application();
- /**
- * Starts the Banshee engine.
- *
- * @param[in] primaryWindowDesc Description of the primary render window that will be created on startup.
- * @param[in] renderAPI Render API plugin to use.
- * @param[in] renderer Renderer plugin to use.
- * @param[in] importers A list of importer plugins to load on startup.
- */
- static void startUp(RENDER_WINDOW_DESC& primaryWindowDesc, RenderAPIPlugin renderAPI,
- RendererPlugin renderer = RendererPlugin::Default, const Vector<String>& importers = Vector<String>());
- /** Returns the absolute path to the builtin managed engine assembly file. */
- Path getEngineAssemblyPath() const;
- /** Returns the absolute path to the game managed assembly file. */
- Path getGameAssemblyPath() const;
- /** Returns the absolute path to the folder where script assemblies are located in. */
- virtual Path getScriptAssemblyFolder() const;
- protected:
- /** @copydoc Module::onStartUp */
- virtual void onStartUp() override;
- /** @copydoc Module::onShutDown */
- virtual void onShutDown() override;
- /** @copydoc CoreApplication::preUpdate */
- virtual void preUpdate() override;
- /** @copydoc CoreApplication::postUpdate */
- virtual void postUpdate() override;
- /** @copydoc CoreApplication::startUpRenderer */
- virtual void startUpRenderer() override;
- /** @copydoc CoreApplication::getShaderIncludeHandler */
- SPtr<IShaderIncludeHandler> getShaderIncludeHandler() const override;
- /** Loads the script system and all script libraries. */
- virtual void loadScriptSystem();
- /** Unloads script libraries and shuts down the script system. */
- virtual void unloadScriptSystem();
- /** Returns the absolute path to the folder where built-in assemblies are located in. */
- virtual Path getBuiltinAssemblyFolder() const;
- /** Translates render system type into library name. */
- static String getLibNameForRenderAPI(RenderAPIPlugin plugin);
- /** Translates renderer type into library name. */
- static String getLibNameForRenderer(RendererPlugin plugin);
- DynLib* mMonoPlugin;
- DynLib* mSBansheeEnginePlugin;
- };
- /** Easy way to access Application. */
- BS_EXPORT Application& gApplication();
- /** @} */
- }
|