QSGRenderNode Class

The QSGRenderNode class represents a set of custom rendering commands targeting the graphics API that is in use by the scenegraph. More...

Header: #include <QSGRenderNode>
qmake: QT += quick
Since: Qt 5.8
Inherits: QSGNode

This class was introduced in Qt 5.8.

Public Types

enum RenderingFlag { BoundedRectRendering, DepthAwareRendering, OpaqueRendering }
enum StateFlag { DepthState, StencilState, ScissorState, ColorState, BlendState, …, RenderTargetState }

Detailed Description

Member Type Documentation

enum QSGRenderNode::RenderingFlag

Possible values for the bitmask returned from flags().

ConstantValueDescription
QSGRenderNode::BoundedRectRendering0x01Indicates that the implementation of render() does not render outside the area reported from rect() in item coordinates. Such node implementations can lead to more efficient rendering, depending on the scenegraph backend. For example, the software backend can continue to use the more optimal partial update path when all render nodes in the scene have this flag set.
QSGRenderNode::DepthAwareRendering0x02Indicates that the implementations of render() conforms to scenegraph expectations by only generating a Z value of 0 in scene coordinates which is then transformed by the matrices retrieved from RenderState::projectionMatrix() and matrix(), as described in the notes for render(). Such node implementations can lead to more efficient rendering, depending on the scenegraph backend. For example, the batching OpenGL renderer can continue to use a more optimal path when all render nodes in the scene have this flag set.
QSGRenderNode::OpaqueRendering0x04Indicates that the implementation of render() writes out opaque pixels for the entire area reported from rect(). By default the renderers must assume that render() can also output semi or fully transparent pixels. Setting this flag can improve performance in some cases.

See also render() and rect().

enum QSGRenderNode::StateFlag

This enum is a bit mask identifying several states.

ConstantValueDescription
QSGRenderNode::DepthState0x01Depth
QSGRenderNode::StencilState0x02Stencil
QSGRenderNode::ScissorState0x04Scissor
QSGRenderNode::ColorState0x08Color
QSGRenderNode::BlendState0x10Blend
QSGRenderNode::CullState0x20Cull
QSGRenderNode::ViewportState0x40View poirt
QSGRenderNode::RenderTargetState0x80Render target