A compositor, describing how to compose the rendering pipeline. More...
Public Member Functions | |
virtual | ~Compositor () |
virtual CompositorNode * | addNode ()=0 |
virtual void | deleteNode (unsigned int index) |
virtual void | changeNodeOrder (unsigned int fromIndex, unsigned int toIndex) |
virtual void | clearNodes () |
unsigned int | getNodeCount () const |
CompositorNode * | getNode (unsigned int index) const |
virtual void | renderChain () |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Compositor & | operator= (const Compositor &)=delete |
Public Member Functions inherited from nkExport::Exportable | |
Exportable () noexcept | |
virtual | ~Exportable () |
A compositor, describing how to compose the rendering pipeline.
This class is the basic system that allows the whole rendering to occur.
The purpose is to populate it with CompositorNode. The nodes can be activated and deactivated on the fly.
Those nodes are populated with TargetOperation, which describes the outputs for a rendering operation.
The operations are populated with any kind of Pass. The pass are executed sequentially to reach the rendering result wished.
This descriptive kind of API allows the engine to organize and schedule work to help maintaining an efficient rendering logic. There is currently no other way in nkGraphics to render.
See CompositorManager::createOrRetrieve() or Compositor::create() for instantiation.
|
virtual |
Destructor.
|
pure virtual |
Adds a node to the compositor.
|
virtual |
Erases and frees a node memory.
index | The index of the node to free. |
|
virtual |
Changes the order of the nodes. Currently, this can be used to reorder the rendering steps (nodes are executed sequentially).
fromIndex | The index of the node to move. |
toIndex | The index to which the node should be moved. |
|
virtual |
Clears and frees all the nodes.
unsigned int nkGraphics::Compositor::getNodeCount | ( | ) | const |
CompositorNode* nkGraphics::Compositor::getNode | ( | unsigned int | index | ) | const |
index | The index of the node to retrieve. |
|
virtual |
Renders the compositor. This triggers the rendering process for the whole compositor. This method is a good candidate to do off-screen rendering.
However, be sure to prepare the component for the context you will want to render for using MainSystem::tickForNewFrame() and specify the right context for your needs. This will setup the cameras, viewports, and other context dependent variables used to feed the rendering pipeline.
|
overridevirtual |
Basic exporting capability.
rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capability.
rootNode | The tree to import from. |
Implements nkExport::Exportable.
|
delete |
Copy operator.