![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\qmlproperty Texture SimpleQuadRenderer::texture The texture to render across the full-screen quad. More...
Public Member Functions | |
| QSSGRenderSimpleQuadRenderer () | |
| virtual bool | prepareData (QSSGFrameData &data) final |
| 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) final |
| Prepare data for rendering. | |
| virtual void | render (QSSGFrameData &data) final |
| Record the render pass. | |
| virtual void | resetForFrame () final |
| Called each time a new frame starts. | |
| virtual RenderMode | mode () const final |
| virtual RenderStage | stage () const final |
| QSSGRenderSimpleQuadRenderer () | |
| virtual bool | prepareData (QSSGFrameData &data) final |
| 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) final |
| Prepare data for rendering. | |
| virtual void | render (QSSGFrameData &data) final |
| Record the render pass. | |
| virtual void | resetForFrame () final |
| Called each time a new frame starts. | |
| virtual RenderMode | mode () const final |
| virtual RenderStage | stage () const final |
| Public Member Functions inherited from QSSGRenderExtension | |
| QSSGRenderExtension () | |
| virtual | ~QSSGRenderExtension () |
| Public Member Functions inherited from QSSGRenderGraphObject | |
| bool | hasGraphicsResources () const noexcept |
| virtual Q_QUICK3D_PROFILE_ID_ | ~QSSGRenderGraphObject () |
Public Attributes | |
| QSSGRenderImage * | image = nullptr |
| QSSGRenderImageTexture | renderImage |
| QRhiShaderResourceBindings * | srb = nullptr |
| QSSGRhiShaderPipelinePtr | quadShaderPipeline |
| Public Attributes inherited from QSSGRenderGraphObject | |
| const Type | type |
| FlagT | flags { 0 } |
Additional Inherited Members | |
| Public Types inherited from QSSGRenderExtension | |
| 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 , Root , Layer , Joint , Skeleton , ImportScene , ReflectionProbe , SceneRoot , 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 , RenderPass , DefaultMaterial = BaseType::Material | BaseType::Resource , PrincipledMaterial , CustomMaterial , SpecularGlossyMaterial , Skin , Image2D = BaseType::Texture | BaseType::Resource , ImageCube , RenderExtension = BaseType::Extension , TextureProvider } |
| enum class | Flags : quint32 { HasGraphicsResources = 0x1 , InternallyReserved = 0xffff0000 } |
| using | TypeT = std::underlying_type_t<Type> |
| using | FlagT = std::underlying_type_t<Flags> |
| 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 |
| Protected Member Functions inherited from QSSGRenderExtension | |
| QSSGRenderExtension (Type inType, FlagT inFlags) | |
| Constructor that allows users to specifying a user-type and flags for an extension. | |
| Protected Member Functions inherited from QSSGRenderGraphObject | |
| QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType) | |
| QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType, FlagT inFlags) | |
\qmlproperty Texture SimpleQuadRenderer::texture The texture to render across the full-screen quad.
\qmltype SimpleQuadRenderer
\nativetype QQuick3DSimpleQuadRenderer
\inqmlmodule QtQuick3D.Helpers
\inherits RenderExtension
\since 6.11
\brief Renders a full-screen textured quad to the main render target.
SimpleQuadRenderer is a \l RenderExtension that blits a \l Texture across
the entire screen. It runs at the \c PostColor stage in the \c Main render
mode, which means it executes after the scene has been drawn but before any
post-processing effects, and it writes directly into the \l View3D's main
render target, overwriting whatever was drawn by the scene.
The most common use case is building a fully custom rendering pipeline:
set \l {View3D::renderFormat}{View3D.renderFormat} to disable Qt Quick 3D's
built-in passes with \c {View3D.DisableInternalPasses}, render the scene
content into one or more \l RenderPass targets, and then use
SimpleQuadRenderer to composite the result back onto the screen.
\note SimpleQuadRenderer is automatically registered as an extension with the
scene — it does not need to be added to \l {View3D::extensions}{View3D.extensions}
manually.
\qml
import QtQuick3D
import QtQuick3D.Helpers
View3D {
Disable the built-in render passes so we can provide our own output renderFormat: View3D.DisableInternalPasses
A custom offscreen pass that renders scene content RenderPass { id: mainColorPass commands: [ RenderablesFilter { renderableTypes: RenderablesFilter.Opaque | RenderablesFilter.Transparent } ] }
Blit the result of the custom pass to the screen SimpleQuadRenderer { texture: Texture { textureProvider: RenderOutputProvider { renderPass: mainColorPass } } } } \endqml
This can be any \l Texture, including one whose \l {Texture::textureProvider}{textureProvider} is set to a \l RenderOutputProvider to display output from a \l RenderPass or one of Qt Quick 3D's built-in passes (such as the depth texture or AO texture).
Definition at line 88 of file qquick3dsimplequadrenderpass.cpp.
|
inline |
Definition at line 92 of file qquick3dsimplequadrenderpass.cpp.
References QSSGRenderSimpleQuadRenderer().
Referenced by QSSGRenderSimpleQuadRenderer(), and QQuick3DSimpleQuadRenderer::updateSpatialNode().
|
inline |
Definition at line 92 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Implements QSSGRenderExtension.
Definition at line 148 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Implements QSSGRenderExtension.
Definition at line 148 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.Implements QSSGRenderExtension.
Definition at line 97 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.Implements QSSGRenderExtension.
Definition at line 97 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.
Implements QSSGRenderExtension.
Definition at line 111 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.
Implements QSSGRenderExtension.
Definition at line 111 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.
Implements QSSGRenderExtension.
Definition at line 121 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
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.
Implements QSSGRenderExtension.
Definition at line 121 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Called each time a new frame starts.
Any data from the previous frame should be cleared at this point.
Implements QSSGRenderExtension.
Definition at line 147 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Called each time a new frame starts.
Any data from the previous frame should be cleared at this point.
Implements QSSGRenderExtension.
Definition at line 147 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Implements QSSGRenderExtension.
Definition at line 149 of file qquick3dsimplequadrenderpass.cpp.
|
inlinefinalvirtual |
Implements QSSGRenderExtension.
Definition at line 149 of file qquick3dsimplequadrenderpass.cpp.
| QSSGRenderImage * QSSGRenderSimpleQuadRenderer::image = nullptr |
Definition at line 151 of file qquick3dsimplequadrenderpass.cpp.
| QSSGRhiShaderPipelinePtr QSSGRenderSimpleQuadRenderer::quadShaderPipeline |
Definition at line 154 of file qquick3dsimplequadrenderpass.cpp.
| QSSGRenderImageTexture QSSGRenderSimpleQuadRenderer::renderImage |
Definition at line 152 of file qquick3dsimplequadrenderpass.cpp.
| QRhiShaderResourceBindings * QSSGRenderSimpleQuadRenderer::srb = nullptr |
Definition at line 153 of file qquick3dsimplequadrenderpass.cpp.