![]() |
Qt 6.x
The Qt SDK
|
Describes state changes that the material wants to apply to the currently active graphics pipeline state. More...
#include <qsgmaterialshader.h>
Public Types | |
enum | BlendFactor { Zero , One , SrcColor , OneMinusSrcColor , DstColor , OneMinusDstColor , SrcAlpha , OneMinusSrcAlpha , DstAlpha , OneMinusDstAlpha , ConstantColor , OneMinusConstantColor , ConstantAlpha , OneMinusConstantAlpha , SrcAlphaSaturate , Src1Color , OneMinusSrc1Color , Src1Alpha , OneMinusSrc1Alpha } |
enum | ColorMaskComponent { R = 1 << 0 , G = 1 << 1 , B = 1 << 2 , A = 1 << 3 } |
enum | CullMode { CullNone , CullFront , CullBack } |
enum | PolygonMode { Fill , Line } |
Specifies the polygon rasterization mode. More... | |
Public Attributes | |
bool | blendEnable |
BlendFactor | srcColor |
BlendFactor | dstColor |
ColorMask | colorWrite |
QColor | blendConstant |
CullMode | cullMode |
PolygonMode | polygonMode |
bool | separateBlendFactors |
BlendFactor | srcAlpha |
BlendFactor | dstAlpha |
Describes state changes that the material wants to apply to the currently active graphics pipeline state.
\inmodule QtQuick
Unlike QSGMaterialShader, directly issuing state change commands with the underlying graphics API is not possible with QSGMaterialShader. This is mainly because the concept of individually changeable states is considered deprecated and not supported with modern graphics APIs.
Therefore, it is up to QSGMaterialShader to expose a data structure with the set of supported states, which the material can change in its updatePipelineState() implementation, if there is one. The scenegraph will then internally apply these changes to the active graphics pipeline state, then rolling them back as appropriate.
When updateGraphicsPipelineState() is called, the struct has all members set to a valid value to reflect the renderer's current state. Not changing any values (or not reimplementing the function) indicates that the material is fine with the defaults (which are dynamic however, depending on QSGMaterial flags, for example).
Definition at line 60 of file qsgmaterialshader.h.
\value Zero \value One \value SrcColor \value OneMinusSrcColor \value DstColor \value OneMinusDstColor \value SrcAlpha \value OneMinusSrcAlpha \value DstAlpha \value OneMinusDstAlpha \value ConstantColor \value OneMinusConstantColor \value ConstantAlpha \value OneMinusConstantAlpha \value SrcAlphaSaturate \value Src1Color \value OneMinusSrc1Color \value Src1Alpha \value OneMinusSrc1Alpha
Definition at line 61 of file qsgmaterialshader.h.
\value R \value G \value B \value A
Enumerator | |
---|---|
R | |
G | |
B | |
A |
Definition at line 83 of file qsgmaterialshader.h.
\value CullNone \value CullFront \value CullBack
Enumerator | |
---|---|
CullNone | |
CullFront | |
CullBack |
Definition at line 91 of file qsgmaterialshader.h.
Specifies the polygon rasterization mode.
Polygon Mode (Triangle Fill Mode in Metal, Fill Mode in D3D) specifies the fill mode used when rasterizing polygons. Polygons may be drawn as solids (Fill), or as a wire mesh (Line).
{Line} polygon mode. OpenGL ES will rasterize all polygons as filled no matter what polygon mode is set. Using
{Line} will make your application non-portable.\value Fill The interior of the polygon is filled (default) \value Line Boundary edges of the polygon are drawn as line segments.
Enumerator | |
---|---|
Fill | |
Line |
Definition at line 97 of file qsgmaterialshader.h.
QColor QSGMaterialShader::GraphicsPipelineState::blendConstant |
Definition at line 106 of file qsgmaterialshader.h.
Referenced by QSG24BitTextMaskRhiShader::updateGraphicsPipelineState(), and QSGHiQSubPixelDistanceFieldTextMaterialRhiShader::updateGraphicsPipelineState().
bool QSGMaterialShader::GraphicsPipelineState::blendEnable |
Definition at line 102 of file qsgmaterialshader.h.
Referenced by QSG24BitTextMaskRhiShader::updateGraphicsPipelineState(), and QSGHiQSubPixelDistanceFieldTextMaterialRhiShader::updateGraphicsPipelineState().
ColorMask QSGMaterialShader::GraphicsPipelineState::colorWrite |
Definition at line 105 of file qsgmaterialshader.h.
CullMode QSGMaterialShader::GraphicsPipelineState::cullMode |
Definition at line 107 of file qsgmaterialshader.h.
Referenced by QSGRhiShaderEffectMaterialShader::updateGraphicsPipelineState().
BlendFactor QSGMaterialShader::GraphicsPipelineState::dstAlpha |
Definition at line 111 of file qsgmaterialshader.h.
BlendFactor QSGMaterialShader::GraphicsPipelineState::dstColor |
Definition at line 104 of file qsgmaterialshader.h.
Referenced by QSG24BitTextMaskRhiShader::updateGraphicsPipelineState(), and QSGHiQSubPixelDistanceFieldTextMaterialRhiShader::updateGraphicsPipelineState().
PolygonMode QSGMaterialShader::GraphicsPipelineState::polygonMode |
Definition at line 108 of file qsgmaterialshader.h.
bool QSGMaterialShader::GraphicsPipelineState::separateBlendFactors |
Definition at line 109 of file qsgmaterialshader.h.
BlendFactor QSGMaterialShader::GraphicsPipelineState::srcAlpha |
Definition at line 110 of file qsgmaterialshader.h.
BlendFactor QSGMaterialShader::GraphicsPipelineState::srcColor |
Definition at line 103 of file qsgmaterialshader.h.
Referenced by QSG24BitTextMaskRhiShader::updateGraphicsPipelineState(), and QSGHiQSubPixelDistanceFieldTextMaterialRhiShader::updateGraphicsPipelineState().