List of nodes to be rendered to an output. More...
Detailed Description
List of nodes to be rendered to an output.
This references all the score::gfx::Node that have an effect on a given output, and manages all the matching renderers, as well as a few shared data, such as output-specific UBOs, shared textures and buffers, etc.
The score::gfx::Graph creates one RenderList per OutputNode in the graph.
Public Types | |
using | Buffers = std::pair< const Mesh *const, MeshBuffers > |
Public Member Functions | |
RenderList (OutputNode &output, const std::shared_ptr< RenderState > &state) | |
void | init () |
Initialize data for this renderer. | |
QRhiResourceUpdateBatch * | initialBatch () const noexcept |
Initial resource update batch. | |
MeshBuffers | initMeshBuffer (const Mesh &mesh, QRhiResourceUpdateBatch &res) |
Create buffers for a mesh and mark them for upload. | |
void | update (QRhiResourceUpdateBatch &res) |
Update / upload this RenderList's shared data. | |
void | render (QRhiCommandBuffer &commands, bool force=false) |
Render every node in order. | |
void | release () |
Release GPU resources owned by this render list. | |
bool | maybeRebuild (bool force=false) |
Check if the render size has changed in order to rebuild the pipelines. | |
TextureRenderTarget | renderTargetForOutput (const Edge &edge) const noexcept |
Obtain the texture corresponding to an output port. | |
QImage | adaptImage (const QImage &in) |
Adapts an image to the GPU limits / format. | |
Buffers | acquireMesh (const ossia::geometry_spec &, QRhiResourceUpdateBatch &res, const Mesh *current, MeshBuffers currentbufs) noexcept |
void | clearRenderers () |
Clear the renderers so that they get reinitialized on the next frame. | |
QRhiTexture & | emptyTexture () const noexcept |
Texture to use when a texture is missing. | |
QRhiBuffer & | outputUBO () const noexcept |
UBO corresponding to the output parameters: | |
const score::gfx::Mesh & | defaultQuad () const noexcept |
A quad mesh correct for this API. | |
const score::gfx::Mesh & | defaultTriangle () const noexcept |
A triangle mesh correct for this API. | |
bool | requiresDepth () const noexcept |
Whether this list of rendering actions requires depth testing at all. | |
int | samples () const noexcept |
bool | canRender () const noexcept |
QSize | renderSize (const Edge *e) const noexcept |
Public Attributes | |
OutputNode & | output |
Output node to which this RenderList is rendering to. | |
RenderState & | state |
RenderState corresponding to this RenderList. | |
std::vector< score::gfx::Node * > | nodes |
Nodes present in this RenderList, in order. | |
std::vector< score::gfx::NodeRenderer * > | renderers |
Renderers - one per node. | |
int64_t | frame = 0 |
Member Function Documentation
◆ adaptImage()
QImage score::gfx::RenderList::adaptImage | ( | const QImage & | in | ) |
Adapts an image to the GPU limits / format.
e.g. Y direction, texture size limits...
◆ initialBatch()
|
noexcept |
Initial resource update batch.
See QRhiResourceUpdateBatch::merge for documentation on this
◆ initMeshBuffer()
MeshBuffers score::gfx::RenderList::initMeshBuffer | ( | const Mesh & | mesh, |
QRhiResourceUpdateBatch & | res | ||
) |
Create buffers for a mesh and mark them for upload.
The meshes used by the nodes are cached (as most are just rendering on a full-screen triangle, which we can reuse).
◆ outputUBO()
|
inlinenoexcept |
UBO corresponding to the output parameters:
- Render size
- Per-API adjustments and globals
◆ renderTargetForOutput()
|
noexcept |
Obtain the texture corresponding to an output port.
This is done by looking for the render target which corresponds to a given port.
◆ requiresDepth()
|
inlinenoexcept |
Whether this list of rendering actions requires depth testing at all.
e.g. it's not needed if we're just doing some generative shaders.
The documentation for this class was generated from the following files:
- RenderList.hpp
- RenderList.cpp