QSSGRenderExtension Class

Base class for extension backend node implementations. 更多...

头: #include <QSSGRenderExtension>
Since: Qt 6.7

公共类型

enum class RenderMode { Standalone, Main }
enum class RenderStage { PreColor, PostColor }

公共函数

virtual QSSGRenderExtension::RenderMode mode () const = 0
virtual bool prepareData (QSSGFrameData & data ) = 0
virtual void prepareRender (QSSGFrameData & data ) = 0
virtual void render (QSSGFrameData & data ) = 0
virtual void resetForFrame () = 0
virtual QSSGRenderExtension::RenderStage stage () const = 0

详细描述

另请参阅 QQuick3DRenderExtension .

成员类型文档编制

enum class QSSGRenderExtension:: RenderMode

Specifies the render extension mode.

常量 描述
QSSGRenderExtension::RenderMode::Standalone 0 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 prepareRender () 和 render () functions are both called during the frame's prepare phase.
QSSGRenderExtension::RenderMode::Main 1 The rendering code is recorded within the main render pass. In this mode the prepareRender () is called in the frame's prepare phase while render () is called the frame's render phase.

enum class QSSGRenderExtension:: RenderStage

Specifies the order the extension will be called.

常量 描述
QSSGRenderExtension::RenderStage::PreColor 0 The rendering code is recorded and executed before the main (color) pass.
QSSGRenderExtension::RenderStage::PostColor 1 The rendering code is recorded and executed after the main (color) pass.

成员函数文档编制

[pure virtual] QSSGRenderExtension::RenderMode QSSGRenderExtension:: mode () const

Returns The render mode used for this extension.

[pure virtual] bool QSSGRenderExtension:: prepareData ( QSSGFrameData & data )

Called after scene data is collected, but before any render data or rendering in the current frame has been done.

Returns Dirty state. Return true if the there are dirty data that needs to be rendered.

注意: Much of the data created/collected from the engine during the prepare and render phases is per-frame and should be released or assumed released at the start of the next frame

另请参阅 QSSGFrameData .

[pure virtual] void QSSGRenderExtension:: prepareRender ( QSSGFrameData & data )

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 RenderMode::Standalone will, if successful, have been completed in full.

注意: Much of the data created/collected from the engine during the prepare and render phases is per-frame and should be released or assumed released at the start of the next frame

另请参阅 QSSGFrameData .

[pure virtual] void QSSGRenderExtension:: render ( QSSGFrameData & data )

Record the render pass. Depending on the extensions mode this function will be called during the frame's prepare or render phase.

使用 data to gain access to the render context from which the active QRhi object can be queried.

另请参阅 QSSGRenderExtension::RenderMode .

[pure virtual] void QSSGRenderExtension:: resetForFrame ()

Called each time a new frame starts. Any data from the previous frame should be cleared at this point.

[pure virtual] QSSGRenderExtension::RenderStage QSSGRenderExtension:: stage () const

Returns The stage in which this render extension will be used.