GraphicsPipelineState Struct

struct QSGMaterialShader::GraphicsPipelineState

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 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.

Member Type Documentation

[since 5.14] enum GraphicsPipelineState::BlendFactor

ConstantValue
QSGMaterialShader::GraphicsPipelineState::Zero0
QSGMaterialShader::GraphicsPipelineState::One1
QSGMaterialShader::GraphicsPipelineState::SrcColor2
QSGMaterialShader::GraphicsPipelineState::OneMinusSrcColor3
QSGMaterialShader::GraphicsPipelineState::DstColor4
QSGMaterialShader::GraphicsPipelineState::OneMinusDstColor5
QSGMaterialShader::GraphicsPipelineState::SrcAlpha6
QSGMaterialShader::GraphicsPipelineState::OneMinusSrcAlpha7
QSGMaterialShader::GraphicsPipelineState::DstAlpha8
QSGMaterialShader::GraphicsPipelineState::OneMinusDstAlpha9
QSGMaterialShader::GraphicsPipelineState::ConstantColor10
QSGMaterialShader::GraphicsPipelineState::OneMinusConstantColor11
QSGMaterialShader::GraphicsPipelineState::ConstantAlpha12
QSGMaterialShader::GraphicsPipelineState::OneMinusConstantAlpha13
QSGMaterialShader::GraphicsPipelineState::SrcAlphaSaturate14
QSGMaterialShader::GraphicsPipelineState::Src1Color15
QSGMaterialShader::GraphicsPipelineState::OneMinusSrc1Color16
QSGMaterialShader::GraphicsPipelineState::Src1Alpha17
QSGMaterialShader::GraphicsPipelineState::OneMinusSrc1Alpha18

This enum was introduced or modified in Qt 5.14.

[since 5.14] enum GraphicsPipelineState::ColorMaskComponent
flags GraphicsPipelineState::ColorMask

ConstantValue
QSGMaterialShader::GraphicsPipelineState::R1 << 0
QSGMaterialShader::GraphicsPipelineState::G1 << 1
QSGMaterialShader::GraphicsPipelineState::B1 << 2
QSGMaterialShader::GraphicsPipelineState::A1 << 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.

[since 5.14] enum GraphicsPipelineState::CullMode

ConstantValue
QSGMaterialShader::GraphicsPipelineState::CullNone0
QSGMaterialShader::GraphicsPipelineState::CullFront1
QSGMaterialShader::GraphicsPipelineState::CullBack2

This enum was introduced or modified in Qt 5.14.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.