GraphicsPipelineState Struct

Struct GraphicsPipelineState is declared in class QSGMaterialRhiShader.

Describes state changes that the material wants to apply to the currently active graphics pipeline state. More...

This struct was introduced in Qt 5.14.

Public Types

enum BlendFactor { Zero, One, SrcColor, OneMinusSrcColor, DstColor, …, OneMinusSrc1Alpha }
flags ColorMask
enum ColorMaskComponent { R, G, B, A }
enum CullMode { CullNone, CullFront, CullBack }

Detailed Description

Unlike QSGMaterialShader, directly issuing state change commands with the underlying graphics API is not possible with QSGMaterialRhiShader. 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 QSGMaterialRhiShader 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.

Member Type Documentation

enum GraphicsPipelineState::BlendFactor

Constant Value
QSGMaterialRhiShader::GraphicsPipelineState::Zero 0
QSGMaterialRhiShader::GraphicsPipelineState::One 1
QSGMaterialRhiShader::GraphicsPipelineState::SrcColor 2
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusSrcColor 3
QSGMaterialRhiShader::GraphicsPipelineState::DstColor 4
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusDstColor 5
QSGMaterialRhiShader::GraphicsPipelineState::SrcAlpha 6
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusSrcAlpha 7
QSGMaterialRhiShader::GraphicsPipelineState::DstAlpha 8
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusDstAlpha 9
QSGMaterialRhiShader::GraphicsPipelineState::ConstantColor 10
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusConstantColor 11
QSGMaterialRhiShader::GraphicsPipelineState::ConstantAlpha 12
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusConstantAlpha 13
QSGMaterialRhiShader::GraphicsPipelineState::SrcAlphaSaturate 14
QSGMaterialRhiShader::GraphicsPipelineState::Src1Color 15
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusSrc1Color 16
QSGMaterialRhiShader::GraphicsPipelineState::Src1Alpha 17
QSGMaterialRhiShader::GraphicsPipelineState::OneMinusSrc1Alpha 18

This enum was introduced or modified in Qt 5.14.

enum GraphicsPipelineState::ColorMaskComponentflags GraphicsPipelineState::ColorMask

Constant Value
QSGMaterialRhiShader::GraphicsPipelineState::R 1 << 0
QSGMaterialRhiShader::GraphicsPipelineState::G 1 << 1
QSGMaterialRhiShader::GraphicsPipelineState::B 1 << 2
QSGMaterialRhiShader::GraphicsPipelineState::A 1 << 3

This enum was introduced or modified in Qt 5.14.

The ColorMask type is a typedef for QFlags<ColorMaskComponent>. It stores an OR combination of ColorMaskComponent values.

enum GraphicsPipelineState::CullMode

Constant Value
QSGMaterialRhiShader::GraphicsPipelineState::CullNone 0
QSGMaterialRhiShader::GraphicsPipelineState::CullFront 1
QSGMaterialRhiShader::GraphicsPipelineState::CullBack 2

This enum was introduced or modified in Qt 5.14.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.14/qsgmaterialrhishader-graphicspipelinestate.html