Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QSSGFrameData Class Reference

\inmodule QtQuick3D More...

#include <qssgrenderextensions.h>

Collaboration diagram for QSSGFrameData:

Classes

struct  Result

Public Types

enum class  RenderResult : quint32 {
  AoTexture , DepthTexture , ScreenTexture , NormalTexture ,
  MotionVectorTexture
}
enum class  AttachmentSelector : quint32 { Attachment0 = 0 , Attachment1 = 1 , Attachment2 = 2 , Attachment3 = 3 }
using TypeMask = QSSGRenderGraphObject::TypeT

Public Member Functions

void scheduleRenderResults (RenderResults results) const
 Schedule the given results to be made available for this frame.
Result getRenderResult (RenderResult id) const
Result getRenderResult (QSSGResourceId userPassId, AttachmentSelector attachment) const
qsizetype getAttachmentCount (QSSGResourceId userPassId) const
QSSGRhiGraphicsPipelineState getPipelineState () const
QSSGCameraId activeCamera () const
QSSGRenderContextInterfacecontextInterface () const
QSSGNodeIdList getLayerNodes (quint32 layerMask, TypeMask typeMask=NodeMask) const
QSSGNodeIdList getLayerNodes (QSSGCameraId cameraId, TypeMask typeMask=NodeMask) const

Static Public Attributes

static constexpr TypeMask NodeMask = QSSGRenderGraphObject::BaseType::Node

Friends

class QSSGLayerRenderData
class QSSGRenderOutputProviderExtension

Detailed Description

\inmodule QtQuick3D

Since
6.7

Storage class containing data collected for a frame.

Definition at line 31 of file qssgrenderextensions.h.

Member Typedef Documentation

◆ TypeMask

Member Enumeration Documentation

◆ AttachmentSelector

Enumerator
Attachment0 
Attachment1 
Attachment2 
Attachment3 

Definition at line 44 of file qssgrenderextensions.h.

◆ RenderResult

enum class QSSGFrameData::RenderResult : quint32
strong
Enumerator
AoTexture 
DepthTexture 
ScreenTexture 
NormalTexture 
MotionVectorTexture 

Definition at line 34 of file qssgrenderextensions.h.

Member Function Documentation

◆ activeCamera()

QSSGCameraId QSSGFrameData::activeCamera ( ) const
nodiscard
Returns
The active camera for the scene, or null if non could be found.

Definition at line 157 of file qssgrenderextensions.cpp.

◆ contextInterface()

QSSGRenderContextInterface * QSSGFrameData::contextInterface ( ) const
nodiscard

Definition at line 168 of file qssgrenderextensions.cpp.

◆ getAttachmentCount()

qsizetype QSSGFrameData::getAttachmentCount ( QSSGResourceId userPassId) const

Definition at line 79 of file qssgrenderextensions.cpp.

◆ getLayerNodes() [1/2]

QSSGNodeIdList QSSGFrameData::getLayerNodes ( QSSGCameraId cameraId,
TypeMask typeMask = NodeMask ) const
nodiscard
Returns
A list of layer nodes for the given cameraId that match the typeMask. If the camera does not have a layer mask, an empty list is returned.

Definition at line 191 of file qssgrenderextensions.cpp.

◆ getLayerNodes() [2/2]

QSSGNodeIdList QSSGFrameData::getLayerNodes ( quint32 layerMask,
TypeMask typeMask = NodeMask ) const
nodiscard
Returns
A list of layer nodes that match the layerMask and typeMask.

Definition at line 176 of file qssgrenderextensions.cpp.

◆ getPipelineState()

QSSGRhiGraphicsPipelineState QSSGFrameData::getPipelineState ( ) const
nodiscard
Returns
Base pipeline state for this frame

Definition at line 147 of file qssgrenderextensions.cpp.

◆ getRenderResult() [1/2]

QSSGFrameData::Result QSSGFrameData::getRenderResult ( QSSGResourceId userPassId,
AttachmentSelector attachment ) const
Returns
The renderable texture result from a user defined render pass with the given userPassId. If no matching user pass could be found, or if the user pass did not produce any renderable textures, an invalid Result is returned.
Note
Even if the function returns a non-null result, the returned QSSGRhiRenderableTexture might not be ready unless the pass rendering to the texture has been executed.
The returned value is only valid within the current frame. On each new frame the renderable will be reset and should therefore be queried again.

Definition at line 105 of file qssgrenderextensions.cpp.

◆ getRenderResult() [2/2]

QSSGFrameData::Result QSSGFrameData::getRenderResult ( RenderResult id) const
Returns
The renderable texture result from id. \nullptr if no matching id was found.
Note
Even if the function returns a non-null result, the returned QSSGRhiRenderableTexture might not be ready unless the pass rendering to the texture has been executed.
The returned value is only valid within the current frame. On each new frame the renderable will be reset and should therefore be queried again.

Definition at line 30 of file qssgrenderextensions.cpp.

◆ scheduleRenderResults()

void QSSGFrameData::scheduleRenderResults ( RenderResults results) const

Schedule the given results to be made available for this frame.

This function should only be called during the prepare phase in \l QSSGRenderExtension::prepareData().

Note
The requested results might not be available if the underlying layer does not support them or if the layer does not contain any data that would make it necessary to produce the requested results, in which case \l getRenderResult() will return a empty result.
See also
QSSGRenderExtension::getRenderResult()

Definition at line 53 of file qssgrenderextensions.cpp.

◆ QSSGLayerRenderData

friend class QSSGLayerRenderData
friend

Definition at line 78 of file qssgrenderextensions.h.

◆ QSSGRenderOutputProviderExtension

friend class QSSGRenderOutputProviderExtension
friend

Definition at line 79 of file qssgrenderextensions.h.

Member Data Documentation

◆ NodeMask

TypeMask QSSGFrameData::NodeMask = QSSGRenderGraphObject::BaseType::Node
staticconstexpr

Definition at line 59 of file qssgrenderextensions.h.


The documentation for this class was generated from the following files: