QShaderProgramBuilder#
Generates a Shader Program content from loaded graphs. More…
Synopsis#
Properties#
Functions#
def
computeShaderCode
()def
computeShaderGraph
()def
enabledLayers
()def
fragmentShaderCode
()def
fragmentShaderGraph
()def
geometryShaderCode
()def
geometryShaderGraph
()def
shaderProgram
()def
vertexShaderCode
()def
vertexShaderGraph
()
Slots#
def
setComputeShaderGraph
(computeShaderGraph)def
setEnabledLayers
(layers)def
setFragmentShaderGraph
(fragmentShaderGraph)def
setGeometryShaderGraph
(geometryShaderGraph)def
setShaderProgram
(program)def
setTessellationControlShaderGraph
(tessellationControlShaderGraph)def
setTessellationEvaluationShaderGraph
(tessellationEvaluationShaderGraph)def
setVertexShaderGraph
(vertexShaderGraph)
Signals#
def
computeShaderCodeChanged
(computeShaderCode)def
computeShaderGraphChanged
(computeShaderGraph)def
enabledLayersChanged
(layers)def
fragmentShaderCodeChanged
(fragmentShaderCode)def
fragmentShaderGraphChanged
(fragmentShaderGraph)def
geometryShaderCodeChanged
(geometryShaderCode)def
geometryShaderGraphChanged
(geometryShaderGraph)def
shaderProgramChanged
(shaderProgram)def
tessellationControlShaderCodeChanged
(tessellationControlShaderCode)def
tessellationControlShaderGraphChanged
(tessellationControlShaderGraph)def
tessellationEvaluationShaderCodeChanged
(tessellationEvaluationShaderCode)def
tessellationEvaluationShaderGraphChanged
(tessellationEvaluationShaderGraph)def
vertexShaderCodeChanged
(vertexShaderCode)def
vertexShaderGraphChanged
(vertexShaderGraph)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
A shader program builder consists of several different shader graphs used to generate shader code.
A cache of generated shader code is maintained. Generated shaders are by defaults saved in QStandardPaths::writableLocation(QStandardPaths::TempLocation)). This path can be overridden by setting environment variable QT3D_WRITABLE_CACHE_PATH to a valid writable path.
The use of the cache can be disabled by setting environment variable QT3D_DISABLE_SHADER_CACHE.
In most cases, changes made to a graph are detected by Qt 3D and a new cache entry will be generated. One case were this will not happen is when code snippets included by a graphs are changed. To work around that, clearing the cache directory or setting environment variable QT3D_REBUILD_SHADER_CACHE can be used to force shader code to be generated again.
- class PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderCode: PySide6.QtCore.QByteArray#
Holds the generate compute shader code.
- Access functions:
Signal
computeShaderCodeChanged
(computeShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the compute shader graph used by this shader program builder.
- Access functions:
setComputeShaderGraph
(computeShaderGraph)Signal
computeShaderGraphChanged
(computeShaderGraph)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.enabledLayers: list of strings#
Holds the list of layers this builder will activate on the shader graphs during code generation.
- Access functions:
setEnabledLayers
(layers)Signal
enabledLayersChanged
(layers)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderCode: PySide6.QtCore.QByteArray#
Holds the generate fragment shader code.
- Access functions:
Signal
fragmentShaderCodeChanged
(fragmentShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the fragment shader graph used by this shader program builder.
- Access functions:
setFragmentShaderGraph
(fragmentShaderGraph)Signal
fragmentShaderGraphChanged
(fragmentShaderGraph)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderCode: PySide6.QtCore.QByteArray#
Holds the generate geometry shader code.
- Access functions:
Signal
geometryShaderCodeChanged
(geometryShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the geometry shader graph used by this shader program builder.
- Access functions:
setGeometryShaderGraph
(geometryShaderGraph)Signal
geometryShaderGraphChanged
(geometryShaderGraph)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.shaderProgram: PySide6.Qt3DRender.Qt3DRender.QShaderProgram#
Holds the shader program on which this builder generates code.
- Access functions:
setShaderProgram
(program)Signal
shaderProgramChanged
(shaderProgram)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderCode: PySide6.QtCore.QByteArray#
Holds the generate tessellation control shader code.
- Access functions:
Signal
tessellationControlShaderCodeChanged
(tessellationControlShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the tesselation control shader graph used by this shader program builder.
- Access functions:
setTessellationControlShaderGraph
(tessellationControlShaderGraph)Signal
tessellationControlShaderGraphChanged
(tessellationControlShaderGraph)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderCode: PySide6.QtCore.QByteArray#
Holds the generate tessellation evaluation shader code.
- Access functions:
Signal
tessellationEvaluationShaderCodeChanged
(tessellationEvaluationShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the tesselation evaluation shader graph used by this shader program builder.
- Access functions:
setTessellationEvaluationShaderGraph
(tessellationEvaluationShaderGraph)Signal
tessellationEvaluationShaderGraphChanged
(tessellationEvaluationShaderGraph)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderCode: PySide6.QtCore.QByteArray#
Holds the generate vertex shader code.
- Access functions:
Signal
vertexShaderCodeChanged
(vertexShaderCode)
- property PᅟySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderGraph: PySide6.QtCore.QUrl#
Holds the URL to the vertex shader graph used by this shader program builder.
- Access functions:
setVertexShaderGraph
(vertexShaderGraph)Signal
vertexShaderGraphChanged
(vertexShaderGraph)
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderCode()#
- Return type:
Getter of property computeShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderCodeChanged(computeShaderCode)#
- Parameters:
computeShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property computeShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderGraph()#
- Return type:
See also
Getter of property computeShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.computeShaderGraphChanged(computeShaderGraph)#
- Parameters:
computeShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property computeShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.enabledLayers()#
- Return type:
list of strings
See also
Getter of property enabledLayers
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.enabledLayersChanged(layers)#
- Parameters:
layers – list of strings
Notification signal of property enabledLayers
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderCode()#
- Return type:
Getter of property fragmentShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderCodeChanged(fragmentShaderCode)#
- Parameters:
fragmentShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property fragmentShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderGraph()#
- Return type:
See also
Getter of property fragmentShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.fragmentShaderGraphChanged(fragmentShaderGraph)#
- Parameters:
fragmentShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property fragmentShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderCode()#
- Return type:
Getter of property geometryShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderCodeChanged(geometryShaderCode)#
- Parameters:
geometryShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property geometryShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderGraph()#
- Return type:
See also
Getter of property geometryShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.geometryShaderGraphChanged(geometryShaderGraph)#
- Parameters:
geometryShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property geometryShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setComputeShaderGraph(computeShaderGraph)#
- Parameters:
computeShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property computeShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setEnabledLayers(layers)#
- Parameters:
layers – list of strings
See also
Setter of property enabledLayers
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setFragmentShaderGraph(fragmentShaderGraph)#
- Parameters:
fragmentShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property fragmentShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setGeometryShaderGraph(geometryShaderGraph)#
- Parameters:
geometryShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property geometryShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setShaderProgram(program)#
- Parameters:
See also
Setter of property shaderProgram
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setTessellationControlShaderGraph(tessellationControlShaderGraph)#
- Parameters:
tessellationControlShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property tessellationControlShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setTessellationEvaluationShaderGraph(tessellationEvaluationShaderGraph)#
- Parameters:
tessellationEvaluationShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property tessellationEvaluationShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.setVertexShaderGraph(vertexShaderGraph)#
- Parameters:
vertexShaderGraph –
PySide6.QtCore.QUrl
See also
Setter of property vertexShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.shaderProgram()#
- Return type:
See also
Getter of property shaderProgram
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.shaderProgramChanged(shaderProgram)#
- Parameters:
shaderProgram –
PySide6.Qt3DRender.Qt3DRender.QShaderProgram
Notification signal of property shaderProgram
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderCode()#
- Return type:
Getter of property tessellationControlShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderCodeChanged(tessellationControlShaderCode)#
- Parameters:
tessellationControlShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property tessellationControlShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderGraph()#
- Return type:
See also
Getter of property tessellationControlShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationControlShaderGraphChanged(tessellationControlShaderGraph)#
- Parameters:
tessellationControlShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property tessellationControlShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderCode()#
- Return type:
Getter of property tessellationEvaluationShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderCodeChanged(tessellationEvaluationShaderCode)#
- Parameters:
tessellationEvaluationShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property tessellationEvaluationShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderGraph()#
- Return type:
Getter of property tessellationEvaluationShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.tessellationEvaluationShaderGraphChanged(tessellationEvaluationShaderGraph)#
- Parameters:
tessellationEvaluationShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property tessellationEvaluationShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderCode()#
- Return type:
Getter of property vertexShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderCodeChanged(vertexShaderCode)#
- Parameters:
vertexShaderCode –
PySide6.QtCore.QByteArray
Notification signal of property vertexShaderCode
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderGraph()#
- Return type:
See also
Getter of property vertexShaderGraph
.
- PySide6.Qt3DRender.Qt3DRender.QShaderProgramBuilder.vertexShaderGraphChanged(vertexShaderGraph)#
- Parameters:
vertexShaderGraph –
PySide6.QtCore.QUrl
Notification signal of property vertexShaderGraph
.