PySide6.QtGui.QShaderCode¶
- class QShaderCode¶
Contains source or binary code for a shader and additional metadata.
Details
When
shader()is empty after retrieving aQShaderCodeinstance fromQShader, it indicates no shader code was found for the requested key.Note
This is a RHI API with limited compatibility guarantees, see
QShaderfor details.Added in version 6.6.
Synopsis¶
Methods¶
def
__init__()def
entryPoint()def
__ne__()def
__eq__()def
setEntryPoint()def
setShader()def
shader()
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
- __init__()¶
- __init__(code[, entry=QByteArray()])
- Parameters:
code –
QByteArrayentry –
QByteArray
Constructs a new
QShaderCodewith the specified shader sourcecodeandentrypoint name.- entryPoint()¶
- Return type:
Returns the entry point name.
See also
- __ne__(rhs)¶
- Parameters:
rhs –
QShaderCode- Return type:
bool
Returns
falseif the values in the twoQShaderCodeobjectslhsandrhsare equal; otherwise returnstrue.- __eq__(rhs)¶
- Parameters:
rhs –
QShaderCode- Return type:
bool
Returns
trueif the twoQShaderCodeobjectslhsandrhsare equal.- setEntryPoint(entry)¶
- Parameters:
entry –
QByteArray
Sets the
entrypoint name.See also
- setShader(code)¶
- Parameters:
code –
QByteArray
Sets the shader source or byte
code.See also
- shader()¶
- Return type:
Returns the shader source or bytecode.
See also