RenderState Class(QSGMaterialShader::RenderState)The QSGMaterialShader::RenderState encapsulates the current rendering state during a call to QSGMaterialShader::updateState(). More... #include <QSGMaterialShader>
Public Types
Public Functions
Detailed DescriptionThe QSGMaterialShader::RenderState encapsulates the current rendering state during a call to QSGMaterialShader::updateState(). The render state contains a number of accessors that the shader needs to respect in order to conform to the current state of the scene graph. The instance is only valid inside a call to QSGMaterialShader::updateState() and should not be used outisde this function. Member Type Documentation
flags RenderState::DirtyStates |
Constant | Value | Description |
---|---|---|
QSGMaterialShader::RenderState::DirtyMatrix | 0x0001 | Used to indicate that the matrix has changed and must be updated. |
QSGMaterialShader::RenderState::DirtyOpacity | 0x0002 | Used to indicate that the opacity has changed and must be updated. |
The DirtyStates type is a typedef for QFlags<DirtyState>. It stores an OR combination of DirtyState values.
Returns the matrix combined of modelview matrix and project matrix.
Returns the QOpenGLContext that is being used for rendering
Returns the modelview determinant to be used for rendering
Returns the device rect of the surface being rendered to
Returns which rendering states that have changed and needs to be updated for geometry rendered with this material to conform to the current rendering state.
Convenience function to check if the dirtyStates() indicates that the matrix needs to be updated.
Conveience function to check if the dirtyStates() indicates that the opacity needs to be updated.
Returns the model view matrix.
If the material has the RequiresFullMatrix flag set, this is guaranteed to be the complete transform matrix calculated from the scenegraph.
However, if this flag is not set, the renderer may choose to alter this matrix. For example, it may pre-transform vertices on the CPU and set this matrix to identity.
In a situation such as the above, it is still possible to retrieve the actual matrix determinant by setting the RequiresDeterminant flag in the material and calling the determinant() accessor.
Returns the accumulated opacity to be used for rendering
Returns the viewport rect of the surface being rendered to.