58 using MaterialList = QList<QSSGResourceId>;
60 static void setModelMaterials(
const QSSGFrameData &frameData,
61 QSSGRenderablesId renderablesId,
63 MaterialList materials);
65 static void setModelMaterials(
const QSSGFrameData &frameData,
66 QSSGRenderablesId renderablesId,
67 MaterialList materials);
69 [[nodiscard]]
static QMatrix4x4 getGlobalTransform(
const QSSGFrameData &frameData,
71 QSSGPrepContextId prepId = {});
73 [[nodiscard]]
static QMatrix4x4 getLocalTransform(
const QSSGFrameData &frameData,
75 [[nodiscard]]
static float getGlobalOpacity(
const QSSGFrameData &frameData,
77 [[nodiscard]]
static float getGlobalOpacity(
const QSSGFrameData &frameData,
79 QSSGPrepContextId prepId);
80 [[nodiscard]]
static float getLocalOpacity(
const QSSGFrameData &frameData,
83 static void setGlobalTransform(
const QSSGFrameData &frameData,
84 QSSGRenderablesId prepId,
86 const QMatrix4x4 &transform);
88 static void setGlobalOpacity(
const QSSGFrameData &frameData,
89 QSSGRenderablesId renderablesId,
109 enum class CreateFlag : quint32
116 Q_DECLARE_FLAGS(CreateFlags, CreateFlag)
118 [[nodiscard]]
static QSSGRenderablesId createRenderables(
const QSSGFrameData &frameData,
119 QSSGPrepContextId prepId,
120 const QSSGNodeIdList &nodes,
121 CreateFlags flags = CreateFlag::None);
123 [[nodiscard]]
static QSSGPrepContextId prepareForRender(
const QSSGFrameData &frameData,
124 const QSSGRenderExtension &ext,
125 QSSGCameraId cameraId,
128 [[nodiscard]]
static QSSGPrepResultId commit(
const QSSGFrameData &frameData,
129 QSSGPrepContextId prepId,
130 QSSGRenderablesId renderablesId,
131 float lodThreshold = 1.0f);
133 static void prepareRenderables(
const QSSGFrameData &frameData,
134 QSSGPrepResultId prepId,
135 QRhiRenderPassDescriptor *renderPassDescriptor,
136 QSSGRhiGraphicsPipelineState &ps,
137 QSSGRenderablesFilters filter = QSSGRenderablesFilter::All);
139 static void renderRenderables(
const QSSGFrameData &frameData,
140 QSSGPrepResultId prepId);
150 enum class ResultOwnership : quint8
156 static void registerRenderResult(
const QSSGFrameData &frameData,
157 QSSGExtensionId extension,
158 QRhiTexture *texture);
159 static void registerRenderResult(
const QSSGFrameData &frameData,
160 QSSGExtensionId extension,
161 QRhiTexture *texture,
162 ResultOwnership ownership);
163 static void registerRenderResultBuffer(
const QSSGFrameData &frameData,
164 QSSGExtensionId extension,
166 static void registerRenderResultBuffer(
const QSSGFrameData &frameData,
167 QSSGExtensionId extension,
169 ResultOwnership ownership);
172 QSSGRenderExtensionHelpers();