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>.
Loading...
Searching...
No Matches
QSGBatchRenderer::RenderNodeState Struct Reference
+ Inheritance diagram for QSGBatchRenderer::RenderNodeState:
+ Collaboration diagram for QSGBatchRenderer::RenderNodeState:

Public Member Functions

const QMatrix4x4projectionMatrix () const override
 
QRect scissorRect () const override
 
bool scissorEnabled () const override
 
int stencilValue () const override
 
bool stencilEnabled () const override
 
const QRegionclipRegion () const override
 
- Public Member Functions inherited from QSGRenderNode::RenderState
virtual ~RenderState ()
 
virtual voidget (const char *state) const
 

Public Attributes

const QMatrix4x4m_projectionMatrix
 
QRect m_scissorRect
 
int m_stencilValue
 
bool m_scissorEnabled
 
bool m_stencilEnabled
 

Detailed Description

Definition at line 3981 of file qsgbatchrenderer.cpp.

Member Function Documentation

◆ clipRegion()

const QRegion * QSGBatchRenderer::RenderNodeState::clipRegion ( ) const
inlineoverridevirtual
Returns
the current clip region or null for backends where clipping is implemented via stencil or scissoring.

The software backend uses no projection, scissor or stencil, meaning most of the render state is not in use. However, the clip region that can be set on the QPainter still has to be communicated since reconstructing this manually in render() is not reasonable. It can therefore be queried via this function. The region is in world coordinates and can be passed to QPainter::setClipRegion() with Qt::ReplaceClip. This must be done before calling QPainter::setTransform() since the clip region is already mapped to the transform provided in QSGRenderNode::matrix().

Implements QSGRenderNode::RenderState.

Definition at line 3988 of file qsgbatchrenderer.cpp.

◆ projectionMatrix()

const QMatrix4x4 * QSGBatchRenderer::RenderNodeState::projectionMatrix ( ) const
inlineoverridevirtual
Returns
pointer to the current projection matrix.

The model-view matrix can be retrieved with QSGRenderNode::matrix(). Typically {projection * modelview} is the matrix that is then used in the vertex shader to transform the vertices.

Implements QSGRenderNode::RenderState.

Definition at line 3983 of file qsgbatchrenderer.cpp.

References m_projectionMatrix.

◆ scissorEnabled()

bool QSGBatchRenderer::RenderNodeState::scissorEnabled ( ) const
inlineoverridevirtual
Returns
the current state of scissoring.
Note
Only relevant for graphics APIs that have a dedicated on/off state of scissoring.

Implements QSGRenderNode::RenderState.

Definition at line 3985 of file qsgbatchrenderer.cpp.

References m_scissorEnabled.

◆ scissorRect()

QRect QSGBatchRenderer::RenderNodeState::scissorRect ( ) const
inlineoverridevirtual
Returns
the current scissor rectangle when clipping is active. x and y are the bottom left coordinates.

Implements QSGRenderNode::RenderState.

Definition at line 3984 of file qsgbatchrenderer.cpp.

References m_scissorRect.

◆ stencilEnabled()

bool QSGBatchRenderer::RenderNodeState::stencilEnabled ( ) const
inlineoverridevirtual
Returns
the current state of stencil testing.
Note
With graphics APIs where stencil testing is enabled in pipeline state objects, instead of individual state-setting commands, it is up to the implementation of render() to enable stencil testing with operations KEEP, comparison function EQUAL, and a read and write mask of 0xFF.

Implements QSGRenderNode::RenderState.

Definition at line 3987 of file qsgbatchrenderer.cpp.

References m_stencilEnabled.

◆ stencilValue()

int QSGBatchRenderer::RenderNodeState::stencilValue ( ) const
inlineoverridevirtual
Returns
the current stencil reference value when clipping is active.

Implements QSGRenderNode::RenderState.

Definition at line 3986 of file qsgbatchrenderer.cpp.

References m_stencilValue.

Member Data Documentation

◆ m_projectionMatrix

const QMatrix4x4* QSGBatchRenderer::RenderNodeState::m_projectionMatrix

Definition at line 3990 of file qsgbatchrenderer.cpp.

Referenced by projectionMatrix().

◆ m_scissorEnabled

bool QSGBatchRenderer::RenderNodeState::m_scissorEnabled

Definition at line 3993 of file qsgbatchrenderer.cpp.

Referenced by scissorEnabled().

◆ m_scissorRect

QRect QSGBatchRenderer::RenderNodeState::m_scissorRect

Definition at line 3991 of file qsgbatchrenderer.cpp.

Referenced by scissorRect().

◆ m_stencilEnabled

bool QSGBatchRenderer::RenderNodeState::m_stencilEnabled

Definition at line 3994 of file qsgbatchrenderer.cpp.

Referenced by stencilEnabled().

◆ m_stencilValue

int QSGBatchRenderer::RenderNodeState::m_stencilValue

Definition at line 3992 of file qsgbatchrenderer.cpp.

Referenced by stencilValue().


The documentation for this struct was generated from the following file: