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 <qssgrenderextensions.h>
Public Types | |
enum class | RenderMode { Standalone , Main } |
Specifies the render extension mode. More... | |
enum class | RenderStage { PreColor , PostColor } |
Specifies the order the extension will be called. More... | |
Public Types inherited from QSSGRenderGraphObject | |
enum | BaseType : quint32 { Node = 0x1000 , Light = 0x2000 , Camera = 0x4000 , Renderable = 0x8000 , Resource = 0x10000 , Material = 0x20000 , Texture = 0x40000 , Extension = 0x80000 , User = 0x80000000 } |
enum class | Type : quint32 { Unknown = 0 , Node = BaseType::Node , Layer , Joint , Skeleton , ImportScene , ReflectionProbe , DirectionalLight = BaseType::Light | BaseType::Node , PointLight , SpotLight , OrthographicCamera = BaseType::Camera | BaseType::Node , PerspectiveCamera , CustomFrustumCamera , CustomCamera , Model = BaseType::Renderable | BaseType::Node , Item2D , Particles , SceneEnvironment = BaseType::Resource , Effect , Geometry , TextureData , MorphTarget , ModelInstance , ModelBlendParticle , ResourceLoader , DefaultMaterial = BaseType::Material | BaseType::Resource , PrincipledMaterial , CustomMaterial , SpecularGlossyMaterial , Skin , Image2D = BaseType::Texture | BaseType::Resource , ImageCube , RenderExtension = BaseType::Extension } |
enum class | Flags : quint32 { HasGraphicsResources = 0x1 } |
using | TypeT = std::underlying_type_t<Type> |
using | FlagT = std::underlying_type_t<Flags> |
Public Member Functions | |
QSSGRenderExtension () | |
virtual | ~QSSGRenderExtension () |
virtual bool | prepareData (QSSGFrameData &data)=0 |
Called after scene data is collected, but before any render data or rendering in the current frame has been done. | |
virtual void | prepareRender (QSSGFrameData &data)=0 |
Prepare data for rendering. | |
virtual void | render (QSSGFrameData &data)=0 |
Record the render pass. | |
virtual void | resetForFrame ()=0 |
Called each time a new frame starts. | |
virtual RenderMode | mode () const =0 |
virtual RenderStage | stage () const =0 |
Public Member Functions inherited from QSSGRenderGraphObject | |
bool | hasGraphicsResources () const noexcept |
virtual Q_QUICK3D_PROFILE_ID_ | ~QSSGRenderGraphObject () |
Additional Inherited Members | |
Static Public Member Functions inherited from QSSGRenderGraphObject | |
static constexpr bool | isNodeType (Type type) noexcept |
static constexpr bool | isLight (Type type) noexcept |
static constexpr bool | isCamera (Type type) noexcept |
static constexpr bool | isMaterial (Type type) noexcept |
static constexpr bool | isTexture (Type type) noexcept |
static constexpr bool | isRenderable (Type type) noexcept |
static constexpr bool | isResource (Type type) noexcept |
static constexpr bool | isExtension (Type type) noexcept |
static constexpr bool | isUserType (Type type) noexcept |
Public Attributes inherited from QSSGRenderGraphObject | |
const Type | type |
FlagT | flags { 0 } |
Protected Member Functions inherited from QSSGRenderGraphObject | |
QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType) | |
QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType, FlagT inFlags) | |
\inmodule QtQuick3D
Base class for extension backend node implementations.
Definition at line 66 of file qssgrenderextensions.h.
|
strong |
Specifies the render extension mode.
\value Standalone The rendering code is recorded in full during the render prepare phase. This will usually imply that there are some output crated for a preceding render extension(s). When this mode is used the \l prepareRender() and \l render() functions are both called during the frame's prepare phase.
\value Main The rendering code is recorded within the main render pass. In this mode the \l prepareRender() is called in the frame's prepare phase while \l render() is called the frame's render phase.
Enumerator | |
---|---|
Standalone | |
Main |
Definition at line 69 of file qssgrenderextensions.h.
|
strong |
Specifies the order the extension will be called.
\value PreColor The rendering code is recorded and executed before the main (color) pass. \value PostColor The rendering code is recorded and executed after the main (color) pass.
Enumerator | |
---|---|
PreColor | |
PostColor |
Definition at line 75 of file qssgrenderextensions.h.
QSSGRenderExtension::QSSGRenderExtension | ( | ) |
Definition at line 94 of file qssgrenderextensions.cpp.
|
virtual |
Definition at line 100 of file qssgrenderextensions.cpp.
|
pure virtual |
Definition at line 188 of file qssgrenderextensions.cpp.
References Main.
|
pure virtual |
Called after scene data is collected, but before any render data or rendering in the current frame has been done.
true
if the there are dirty data that needs to be rendered.Definition at line 142 of file qssgrenderextensions.cpp.
References Q_UNUSED.
|
pure virtual |
Prepare data for rendering.
Build and collect data needed for rendering. Any render extension scheduled before this one has been processed. In addition; any render extension of mode \l RenderMode::Standalone will, if successful, have been completed in full.
Definition at line 158 of file qssgrenderextensions.cpp.
References Q_UNUSED.
|
pure virtual |
Record the render pass.
Depending on the extensions \l {RenderMode}{mode} this function will be called during the frame's prepare or render phase.
Use data to gain access to the render context from which the active QRhi object can be queried.
Definition at line 171 of file qssgrenderextensions.cpp.
References Q_UNUSED.
|
pure virtual |
Called each time a new frame starts.
Any data from the previous frame should be cleared at this point.
Definition at line 180 of file qssgrenderextensions.cpp.
|
pure virtual |
Definition at line 196 of file qssgrenderextensions.cpp.
References PostColor.