GraphicsPipelineState Struct

struct QSGMaterialShader ::GraphicsPipelineState

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

This struct was introduced in Qt 5.14.

公共类型

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

详细描述

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

成员类型文档编制

[since 5.14] enum GraphicsPipelineState:: BlendFactor

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

该枚举在 Qt 5.14 引入或被修改。

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

常量
QSGMaterialShader::GraphicsPipelineState::R 1 << 0
QSGMaterialShader::GraphicsPipelineState::G 1 << 1
QSGMaterialShader::GraphicsPipelineState::B 1 << 2
QSGMaterialShader::GraphicsPipelineState::A 1 << 3

该枚举在 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

常量
QSGMaterialShader::GraphicsPipelineState::CullNone 0
QSGMaterialShader::GraphicsPipelineState::CullFront 1
QSGMaterialShader::GraphicsPipelineState::CullBack 2

该枚举在 Qt 5.14 引入或被修改。