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().
| Constant | Value | Description |
|---|---|---|
QSGRenderNode::BoundedRectRendering | 0x01 | Indicates 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::DepthAwareRendering | 0x02 | Indicates 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::OpaqueRendering | 0x04 | Indicates 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.
| Constant | Value | Description |
|---|---|---|
QSGRenderNode::DepthState | 0x01 | Depth |
QSGRenderNode::StencilState | 0x02 | Stencil |
QSGRenderNode::ScissorState | 0x04 | Scissor |
QSGRenderNode::ColorState | 0x08 | Color |
QSGRenderNode::BlendState | 0x10 | Blend |
QSGRenderNode::CullState | 0x20 | Cull |
QSGRenderNode::ViewportState | 0x40 | View poirt |
QSGRenderNode::RenderTargetState | 0x80 | Render target |