Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
\inmodule QtQuick3D More...
#include <qssgrenderhelpers.h>
Public Types | |
enum class | CreateFlag : quint32 { None , Recurse = 0x1 , Steal = 0x2 } |
\value None The default value. More... | |
using | NodeList = QList<QSSGNodeId> |
Static Public Member Functions | |
static QSSGRenderablesId | createRenderables (const QSSGFrameData &frameData, QSSGPrepContextId prepId, const NodeList &nodes, CreateFlags flags=CreateFlag::None) |
Takes a list of node ids and create renderables that can be further processed by the renderer. | |
static QSSGPrepContextId | prepareForRender (const QSSGFrameData &frameData, const QSSGRenderExtension &ext, QSSGCameraId cameraId, quint32 slot=0) |
prepareForRender() creates a context for collecting and storing information about the render-data associated with this render extension. | |
static QSSGPrepResultId | commit (const QSSGFrameData &frameData, QSSGPrepContextId prepId, QSSGRenderablesId renderablesId, float lodThreshold=1.0f) |
Once the required changes have been done to the renderables, the data can marked as ready for the renderer. | |
static void | prepareRenderables (const QSSGFrameData &frameData, QSSGPrepResultId prepId, QRhiRenderPassDescriptor *renderPassDescriptor, QSSGRhiGraphicsPipelineState &ps, QSSGRenderablesFilters filter=QSSGRenderablesFilter::All) |
Prepare the draw call data needed for the renderables before calling \l {renderRenderables}. | |
static void | renderRenderables (const QSSGFrameData &frameData, QSSGPrepResultId prepId) |
Render the renderables. | |
\inmodule QtQuick3D
Class containing helper functions for setting up and render QtQuick3D renderables.
Definition at line 103 of file qssgrenderhelpers.h.
using QSSGRenderHelpers::NodeList = QList<QSSGNodeId> |
Definition at line 106 of file qssgrenderhelpers.h.
|
strong |
\value None The default value.
Renderables are created only for the nodes specified. \value Recurse Renderables are created for each node and their children. \value Steal Renderables are taken from the engine and won't be rendered by QtQuick3D.
Enumerator | |
---|---|
None | |
Recurse | |
Steal |
Definition at line 108 of file qssgrenderhelpers.h.
|
static |
Once the required changes have been done to the renderables, the data can marked as ready for the renderer.
frameData, prepId, renderablesId, lodThreshold
Definition at line 137 of file qssgrenderhelpers.cpp.
References QSSGFrameData::contextInterface(), QSSGLayerRenderData::getCurrent(), Invalid, and QSSG_ASSERT_X.
|
static |
Takes a list of node ids and create renderables that can be further processed by the renderer.
If there are no nodes, or no renderable nodes in the list, the returned id will be invalid.
By default the function does not recurse down and included children of the nodes in the list. Enabling recursion can be achieved by passing in the \l{CreateFlag::}{Recurse} flag in the flags argument.
frameData, prepId
Definition at line 83 of file qssgrenderhelpers.cpp.
References QSSGFrameData::contextInterface(), QSSGLayerRenderData::getCurrent(), Invalid, QSSG_ASSERT_X, and QList< T >::size().
|
static |
prepareForRender() creates a context for collecting and storing information about the render-data associated with this render extension.
If the same nodes are to be rendered more then once but with different properties, for example a different material or camera, then a new context will be needed. To create several contexts for one extension the slot argument can be used. The default context is created in slot 0.
frameData, ext, cameraId
Definition at line 114 of file qssgrenderhelpers.cpp.
References QSSGFrameData::contextInterface(), QSSGLayerRenderData::getCurrent(), Invalid, QSSGRenderGraphObject::isCamera(), and QSSG_ASSERT_X.
|
static |
Prepare the draw call data needed for the renderables before calling \l {renderRenderables}.
frameData, renderPassDescriptor, ps, prepId, filter
Definition at line 157 of file qssgrenderhelpers.cpp.
References QSSGFrameData::contextInterface(), QSSGLayerRenderData::getCurrent(), and QSSG_ASSERT_X.
|
static |
Render the renderables.
frameData, prepId
Definition at line 176 of file qssgrenderhelpers.cpp.
References QSSGFrameData::contextInterface(), QSSGLayerRenderData::getCurrent(), and QSSG_ASSERT_X.