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
RenderNodeState Struct Reference
+ Inheritance diagram for RenderNodeState:
+ Collaboration diagram for 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

QMatrix4x4 ident
 
QRegion cr
 

Detailed Description

Definition at line 198 of file qsgsoftwarerenderablenode.cpp.

Member Function Documentation

◆ clipRegion()

const QRegion * 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 205 of file qsgsoftwarerenderablenode.cpp.

References cr.

◆ projectionMatrix()

const QMatrix4x4 * 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 200 of file qsgsoftwarerenderablenode.cpp.

References ident.

◆ scissorEnabled()

bool 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 202 of file qsgsoftwarerenderablenode.cpp.

◆ scissorRect()

QRect 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 201 of file qsgsoftwarerenderablenode.cpp.

◆ stencilEnabled()

bool 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 204 of file qsgsoftwarerenderablenode.cpp.

◆ stencilValue()

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

Implements QSGRenderNode::RenderState.

Definition at line 203 of file qsgsoftwarerenderablenode.cpp.

Member Data Documentation

◆ cr

QRegion RenderNodeState::cr

◆ ident

QMatrix4x4 RenderNodeState::ident

Definition at line 206 of file qsgsoftwarerenderablenode.cpp.

Referenced by projectionMatrix().


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