- All Implemented Interfaces:
QtObjectInterface
The QSGSimpleMaterialShader class provides a convenient way of building custom OpenGL-based materials for the scene graph.
Java wrapper for Qt class QSGSimpleMaterialShader
Warning: This utility class is only functional when running with the legacy OpenGL renderer of the Qt Quick scenegraph. Its usage is not recommended in new application code.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.quick.QSGMaterialShader
QSGMaterialShader.RenderState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]voidvoidReimplement this function to resolve the location of named uniforms in the shader program.final StringReturns the name for the transform matrix uniform of this item.final StringReturns the name for the opacity uniform of this item.voidupdateState(QSGMaterialShader.RenderState state, QSGMaterial newMaterial, QSGMaterial oldMaterial) abstract voidupdateState(State newState, State oldState) Called whenever the state of this shader should be updated from oldState to newState, typical for each new set of geometries being drawn.Methods inherited from class io.qt.quick.QSGMaterialShader
activate, compile, deactivate, fragmentShader, program, setShaderSourceFile, setShaderSourceFiles, vertexShaderMethods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QSGSimpleMaterialShader
-
-
Method Details
-
initialize
public void initialize()Description copied from class:QSGMaterialShader- Overrides:
initializein classQSGMaterialShader
-
uniformMatrixName
Returns the name for the transform matrix uniform of this item. The default value is qt_Matrix.
-
uniformOpacityName
Returns the name for the opacity uniform of this item. The default value is qt_Opacity.
-
updateState
public void updateState(QSGMaterialShader.RenderState state, QSGMaterial newMaterial, QSGMaterial oldMaterial) Description copied from class:QSGMaterialShader- Overrides:
updateStatein classQSGMaterialShader- Parameters:
state-newMaterial-oldMaterial-
-
updateState
Called whenever the state of this shader should be updated from oldState to newState, typical for each new set of geometries being drawn.
Both the old and the new state are passed in so that the implementation can compare and minimize the state changes when applicable.
See
QSGSimpleMaterialShader::updateState(const State *, const State *) -
resolveUniforms
public void resolveUniforms()Reimplement this function to resolve the location of named uniforms in the shader program.
This function is called when the material shader is initialized.
-
attributes
-
attributeNames
Description copied from class:QSGMaterialShader- Specified by:
attributeNamesin classQSGMaterialShader- Returns:
-