API Documentation
Public Member Functions | List of all members
nkGraphics::CompositorManager Class Referencefinal

Manages the compositors recorded. More...

Inheritance diagram for nkGraphics::CompositorManager:
nkGraphics::Manager< Compositor >

Public Member Functions

CompositorgetActiveCompositor () const
 
CompositorgetDefaultCompositor () const
 
void setActiveCompositor (Compositor *compositor)
 
void setDefaultCompositor (Compositor *compositor)
 
void prepareForContext (RenderContext *context)
 
- Public Member Functions inherited from nkGraphics::Manager< Compositor >
CompositorcreateOrRetrieve (nkMemory::StringView name)
 
Compositorrecord (nkMemory::StringView name, nkMemory::UniquePtr< Compositor > resource)
 
Compositorget (nkMemory::StringView name) const
 
CompositorgetByIndex (unsigned int index) const
 
void rename (nkMemory::StringView currentName, nkMemory::StringView newName)
 
void erase (nkMemory::StringView name)
 
nkMemory::UniquePtr< Compositorrelinquish (nkMemory::StringView name)
 

Detailed Description

Manages the compositors recorded.

Compositor creation / deletion can go through this class, allowing it to act as a repository of resources which lifetime will get managed as needed. Like any Manager, it is always owning the memory it owns, unless it passes back the ownership explicitly.

Member Function Documentation

◆ getActiveCompositor()

Compositor* nkGraphics::CompositorManager::getActiveCompositor ( ) const
Returns
The currently active compositor.

◆ getDefaultCompositor()

Compositor* nkGraphics::CompositorManager::getDefaultCompositor ( ) const
Returns
The currently set default compositor.

◆ setActiveCompositor()

void nkGraphics::CompositorManager::setActiveCompositor ( Compositor compositor)

Sets the compositor currently active. This compositor will be the reference for given rendering iteration.

Parameters
compositorThe compositor to use.

◆ setDefaultCompositor()

void nkGraphics::CompositorManager::setDefaultCompositor ( Compositor compositor)

Sets the default compositor. This compositor will be the activated one when a context has no compositor attached.

Parameters
compositorThe compositor to use.

◆ prepareForContext()

void nkGraphics::CompositorManager::prepareForContext ( RenderContext context)

Prepares the rendering and sets as active the compositor tied to the context given. If none is set, the default compositor will be activated.

Parameters
contextThe context from which to activate a compositor.

The documentation for this class was generated from the following file: