A render queue, where all items that have to be rendered are queued.
More...
|
virtual | ~RenderQueue () |
|
virtual Buffer * | getAccelerationStructureBuffer () const |
|
System * | getSystem () const |
|
nkMemory::StringView | getName () const |
|
bool | getRaytraced () const |
|
bool | getHidden () const |
|
Entity * | getEntity (unsigned int index) const |
|
unsigned int | getEntityCount () const |
|
RenderStrategy * | getRenderStrategy () const |
|
virtual void | setName (nkMemory::StringView name) |
|
virtual void | setRaytraced (bool value) |
|
void | setRenderStrategy (RenderStrategy *value) |
|
void | setHidden (bool value) |
|
virtual Entity * | addEntity () |
|
virtual void | eraseEntity (Entity *ent) |
|
virtual void | clearQueue () |
|
RenderCommandQueue | bakeRenderCommandQueue (Shader *shader=nullptr, bool transparent=false) |
|
virtual void | updateEntityNode (Entity *ent, Node *oldNode) |
|
virtual void | updateEntityRenderInfo (Entity *ent, EntityRenderInfo *oldInfo, EntityRenderInfo *newInfo) |
|
virtual void | updateMesh (Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Mesh *oldMesh, Mesh *newMesh) |
|
virtual void | updateShader (Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Shader *oldShader, Shader *newShader) |
|
virtual void | updateShaderRaytracing (Entity *ent, EntityRenderInfoSlot *slot, EntityRenderLodSlot *lod, Shader *oldShader, Shader *newShader) |
|
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
|
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
|
| Exportable () noexcept |
|
virtual | ~Exportable () |
|
A render queue, where all items that have to be rendered are queued.
A queue can allocate entities to render. The entities can be used as-is, or attached to a Node, using Entity::setParentNode(). When an object is attached to the graph, it enables it to work with the transformations from the graph system.
See RenderQueueManager::createOrRetrieve() or RenderQueue::create() for instantiation.
◆ ~RenderQueue()
virtual nkGraphics::RenderQueue::~RenderQueue |
( |
| ) |
|
|
virtual |
◆ getAccelerationStructureBuffer()
virtual Buffer* nkGraphics::RenderQueue::getAccelerationStructureBuffer |
( |
| ) |
const |
|
virtual |
Retrieves the acceleration structure's buffer. This buffer can be fed to shaders for raytracing. If raytracing is not supported, this buffer will be empty.
- Returns
- The acceleration structure's buffer used.
◆ getSystem()
System* nkGraphics::RenderQueue::getSystem |
( |
| ) |
const |
- Returns
- The system the resource lives in.
◆ getName()
- Returns
- The name assigned.
◆ getRaytraced()
bool nkGraphics::RenderQueue::getRaytraced |
( |
| ) |
const |
- Returns
- Whether the queue is marked as raytraced (true) or not (false).
◆ getHidden()
bool nkGraphics::RenderQueue::getHidden |
( |
| ) |
const |
- Returns
- Whether the render queue is hidden from project exporting (true) or not (false).
◆ getEntity()
Entity* nkGraphics::RenderQueue::getEntity |
( |
unsigned int |
index | ) |
const |
- Parameters
-
index | The index of the entity to retrieve. |
- Returns
- The entity requested if available, nullptr else.
◆ getEntityCount()
unsigned int nkGraphics::RenderQueue::getEntityCount |
( |
| ) |
const |
- Returns
- The number of entities currently in the queue.
◆ getRenderStrategy()
- Returns
- The currently used render strategy.
◆ setName()
◆ setRaytraced()
virtual void nkGraphics::RenderQueue::setRaytraced |
( |
bool |
value | ) |
|
|
virtual |
Sets whether this queue should be raytraced. Raytraced queues will keep their acceleration structures updated as they change. Enable this only when needed.
- Parameters
-
value | If the queue should be raytraced (true) or not (false). |
◆ setRenderStrategy()
void nkGraphics::RenderQueue::setRenderStrategy |
( |
RenderStrategy * |
value | ) |
|
Sets the strategy to use when rendering a pass using the render queue.
- Parameters
-
value | The strategy to use, nullptr to reset to the default strategy. |
◆ setHidden()
void nkGraphics::RenderQueue::setHidden |
( |
bool |
value | ) |
|
Sets whether the render queue should be hidden from the project exporting functions.
- Parameters
-
value | If it should be hidden (true) or not (false). |
◆ addEntity()
virtual Entity* nkGraphics::RenderQueue::addEntity |
( |
| ) |
|
|
virtual |
Adds an entity into the queue.
- Returns
- The entity allocated and added to the queue.
◆ eraseEntity()
virtual void nkGraphics::RenderQueue::eraseEntity |
( |
Entity * |
ent | ) |
|
|
virtual |
Erases and frees the memory of an entity.
- Parameters
-
◆ clearQueue()
virtual void nkGraphics::RenderQueue::clearQueue |
( |
| ) |
|
|
virtual |
Clears the queue and makes it empty again.
◆ bakeRenderCommandQueue()
RenderCommandQueue nkGraphics::RenderQueue::bakeRenderCommandQueue |
( |
Shader * |
shader = nullptr , |
|
|
bool |
transparent = false |
|
) |
| |
Translates the render queue into a command queue to render. Called by the MonoMaterialPass and RenderScenePass to eventually tansmit it to the renderer. This can also be called to check on custom strategies during their development time.
- Parameters
-
shader | A Shader to communicate as a parameter to the strategy, used by the MonoMaterialPass to provide its own shader. |
transparent | Whether the calling pass is flagged as transparent, or not. |
- Returns
- The command queue the strategy currently used provides back.
◆ updateEntityNode()
virtual void nkGraphics::RenderQueue::updateEntityNode |
( |
Entity * |
ent, |
|
|
Node * |
oldNode |
|
) |
| |
|
virtual |
Updates called from registered objects. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
oldNode | The node the entity updates from. |
◆ updateEntityRenderInfo()
Update called from registered object. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
oldInfo | The information the call updates from. |
newInfo | The new information the call updates to. |
◆ updateMesh()
Update called from registered object. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
slot | The parent slot call is made from. |
lod | The LOD the call is made from. |
oldMesh | The mesh the call updates from. |
newMesh | The mesh the call updates to. |
◆ updateShader()
Update called from registered object. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
slot | The parent slot call is made from. |
lod | The LOD the call is made from. |
oldShader | The shader the call udpates from. |
newShader | The shader the call updates to. |
◆ updateShaderRaytracing()
Update called from registered object. In theory, external code should not use it.
- Parameters
-
ent | The caller. |
slot | The parent slot call is made from. |
lod | The LOD the call is made from. |
oldShader | The shader the call udpates from. |
newShader | The shader the call updates to. |
◆ exportClassToTree()
virtual void nkGraphics::RenderQueue::exportClassToTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
Exports an item into a tree describing its structure and its data.
- Parameters
-
rootNode | The node into which the object has to write its related information. |
Implements nkExport::Exportable.
◆ importClassFromTree()
virtual void nkGraphics::RenderQueue::importClassFromTree |
( |
nkExport::Node * |
rootNode | ) |
|
|
overridevirtual |
Imports information from a tree which is supposed to describe its structure and data.
- Parameters
-
rootNode | The root node of the tree holding the information. |
Implements nkExport::Exportable.
◆ create()
Creates a standalone resource, linking it to a system, but no manager. This method can be used to allocate a resource and manually manage its lifetime.
- Parameters
-
system | The system to create the resource into. If left to nullptr, then the Singleton instance will be used. |
- Returns
- The created resource instance.
The documentation for this class was generated from the following file: