| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #pragma once |
| 4 | |
| 5 | #include "BsCorePrerequisites.h" |
| 6 | |
| 7 | namespace bs |
| 8 | { |
| 9 | /** @addtogroup Renderer-Internal |
| 10 | * @{ |
| 11 | */ |
| 12 | |
| 13 | /** |
| 14 | * Factory class for creating Renderer objects. Implement this class for any custom renderer classes you may have, and |
| 15 | * register it with renderer manager. |
| 16 | * |
| 17 | * @see RendererManager |
| 18 | */ |
| 19 | class BS_CORE_EXPORT RendererFactory |
| 20 | { |
| 21 | public: |
| 22 | virtual ~RendererFactory() = default; |
| 23 | |
| 24 | /** Creates a new instance of the renderer. */ |
| 25 | virtual SPtr<ct::Renderer> create() = 0; |
| 26 | |
| 27 | /** Returns the name of the renderer this factory creates. */ |
| 28 | virtual const String& name() const = 0; |
| 29 | }; |
| 30 | |
| 31 | /** @} */ |
| 32 | } |