- 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
-
Method Summary
Modifier and TypeMethodDescriptionString[]
void
void
Reimplement this function to resolve the location of named uniforms in the shader program.final String
Returns the name for the transform matrix uniform of this item.final String
Returns the name for the opacity uniform of this item.void
updateState
(QSGMaterialShader.RenderState state, QSGMaterial newMaterial, QSGMaterial oldMaterial) abstract void
updateState
(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, vertexShader
Methods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QSGSimpleMaterialShader
-
-
Method Details
-
initialize
public void initialize()Description copied from class:QSGMaterialShader
- Overrides:
initialize
in 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:
updateState
in 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:
attributeNames
in classQSGMaterialShader
- Returns:
-