Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSGMaterialShader::GraphicsPipelineState Class Reference

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

#include <qsgmaterialshader.h>

+ Collaboration diagram for QSGMaterialShader::GraphicsPipelineState:

Public Types

enum  BlendFactor {
  Zero , One , SrcColor , OneMinusSrcColor ,
  DstColor , OneMinusDstColor , SrcAlpha , OneMinusSrcAlpha ,
  DstAlpha , OneMinusDstAlpha , ConstantColor , OneMinusConstantColor ,
  ConstantAlpha , OneMinusConstantAlpha , SrcAlphaSaturate , Src1Color ,
  OneMinusSrc1Color , Src1Alpha , OneMinusSrc1Alpha
}
 
enum  BlendOp {
  BlendOpAdd , BlendOpSubtract , BlendOpReverseSubtract , BlendOpMin ,
  BlendOpMax
}
 
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
 
BlendOp opColor
 
BlendOp opAlpha
 

Detailed Description

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

\inmodule QtQuick

Since
5.14

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 63 of file qsgmaterialshader.h.

Member Enumeration Documentation

◆ BlendFactor

Since
5.14

\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

Enumerator
Zero 
One 
SrcColor 
OneMinusSrcColor 
DstColor 
OneMinusDstColor 
SrcAlpha 
OneMinusSrcAlpha 
DstAlpha 
OneMinusDstAlpha 
ConstantColor 
OneMinusConstantColor 
ConstantAlpha 
OneMinusConstantAlpha 
SrcAlphaSaturate 
Src1Color 
OneMinusSrc1Color 
Src1Alpha 
OneMinusSrc1Alpha 

Definition at line 64 of file qsgmaterialshader.h.

◆ BlendOp

Since
6.8

\value BlendOpAdd \value BlendOpSubtract \value BlendOpReverseSubtract \value BlendOpMin \value BlendOpMax

Enumerator
BlendOpAdd 
BlendOpSubtract 
BlendOpReverseSubtract 
BlendOpMin 
BlendOpMax 

Definition at line 86 of file qsgmaterialshader.h.

◆ ColorMaskComponent

Since
5.14

\value R \value G \value B \value A

Enumerator

Definition at line 94 of file qsgmaterialshader.h.

◆ CullMode

Since
5.14

\value CullNone \value CullFront \value CullBack

Enumerator
CullNone 
CullFront 
CullBack 

Definition at line 102 of file qsgmaterialshader.h.

◆ PolygonMode

Specifies the polygon rasterization mode.

Since
6.4

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

Warning
OpenGL ES does not support the {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 108 of file qsgmaterialshader.h.

Member Data Documentation

◆ blendConstant

QColor QSGMaterialShader::GraphicsPipelineState::blendConstant

◆ blendEnable

bool QSGMaterialShader::GraphicsPipelineState::blendEnable

◆ colorWrite

ColorMask QSGMaterialShader::GraphicsPipelineState::colorWrite

Definition at line 116 of file qsgmaterialshader.h.

◆ cullMode

CullMode QSGMaterialShader::GraphicsPipelineState::cullMode

◆ dstAlpha

BlendFactor QSGMaterialShader::GraphicsPipelineState::dstAlpha

Definition at line 122 of file qsgmaterialshader.h.

◆ dstColor

◆ opAlpha

BlendOp QSGMaterialShader::GraphicsPipelineState::opAlpha

Definition at line 124 of file qsgmaterialshader.h.

◆ opColor

BlendOp QSGMaterialShader::GraphicsPipelineState::opColor

Definition at line 123 of file qsgmaterialshader.h.

◆ polygonMode

PolygonMode QSGMaterialShader::GraphicsPipelineState::polygonMode

Definition at line 119 of file qsgmaterialshader.h.

◆ separateBlendFactors

bool QSGMaterialShader::GraphicsPipelineState::separateBlendFactors

Definition at line 120 of file qsgmaterialshader.h.

◆ srcAlpha

BlendFactor QSGMaterialShader::GraphicsPipelineState::srcAlpha

Definition at line 121 of file qsgmaterialshader.h.

◆ srcColor


The documentation for this class was generated from the following file: