2
0

BsRenderAPIManager.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. #include "BsModule.h"
  4. #include "BsRenderAPIFactory.h"
  5. namespace BansheeEngine
  6. {
  7. /** @cond INTERNAL */
  8. /** @addtogroup RenderAPI
  9. * @{
  10. */
  11. /** Manager that handles render system start up. */
  12. class BS_CORE_EXPORT RenderAPIManager : public Module<RenderAPIManager>
  13. {
  14. public:
  15. RenderAPIManager();
  16. ~RenderAPIManager();
  17. /**
  18. * Starts the render API with the provided name and creates the primary render window.
  19. *
  20. * @param[in] name Name of the render system to start. Factory for this render system must be
  21. * previously registered.
  22. * @param[in] primaryWindowDesc Contains options used for creating the primary window.
  23. * @return Created render window if initialization is successful, null otherwise.
  24. */
  25. RenderWindowPtr initialize(const String& name, RENDER_WINDOW_DESC& primaryWindowDesc);
  26. /** Registers a new render API factory responsible for creating a specific render system type. */
  27. void registerFactory(RenderAPIFactoryPtr factory);
  28. private:
  29. Vector<RenderAPIFactoryPtr> mAvailableFactories;
  30. bool mRenderAPIInitialized;
  31. };
  32. /** @} */
  33. /** @endcond */
  34. }