class RendererManager

Allows you to change and retrieve the active renderer.

Active renderer will be used for rendering all objects in the following frame.

Public

Methods

~RendererManager

~RendererManager() noexcept

SetActive

void SetActive(const String &pluginName)

Loads the renderer plugin with the provided name and makes it the active renderer.

You must call Initialize() after setting the active renderer to properly activate it.

Initialize

void Initialize(const SPtr<GpuDevice> &gpuDevice)

Initializes the currently active renderer on the provided GPU device, making it ready to render.

RequestFrameCapture

void RequestFrameCapture()

Queues GPU command capture of the next frame, if a frame capture is set up.

GetActive

SPtr<render::Renderer> GetActive()

Returns the currently active renderer.

Null if no renderer is active.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

~Module<T>

virtual ~Module<T>() = default

OnStartUp

virtual void OnStartUp()

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

virtual void OnShutDown()

Override if you want your module to be notified just before it is deleted.

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Fields

mPlugin

LoadedPlugin mPlugin

mFactory

RendererFactory * mFactory

mActiveRenderer

SPtr<render::Renderer> mActiveRenderer