GraphicsPipelineState Struct

struct QSGMaterialRhiShader::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 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

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

This enum was introduced or modified in Qt 5.14.

enum GraphicsPipelineState::ColorMaskComponent
flags GraphicsPipelineState::ColorMask

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

enum GraphicsPipelineState::CullMode

ConstantValue
QSGMaterialRhiShader::GraphicsPipelineState::CullNone0
QSGMaterialRhiShader::GraphicsPipelineState::CullFront1
QSGMaterialRhiShader::GraphicsPipelineState::CullBack2

This enum was introduced or modified in Qt 5.14.

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