PySide6.QtGui.QShaderCode

class QShaderCode

Contains source or binary code for a shader and additional metadata.

Details

When shader() is empty after retrieving a QShaderCode instance from QShader , it indicates no shader code was found for the requested key.

Note

This is a RHI API with limited compatibility guarantees, see QShader for details.

Added in version 6.6.

Synopsis

Methods

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:

Constructs a new QShaderCode with the specified shader source code and entry point name.

entryPoint()
Return type:

QByteArray

Returns the entry point name.

See also

setEntryPoint()

__ne__(rhs)
Parameters:

rhsQShaderCode

Return type:

bool

__eq__(rhs)
Parameters:

rhsQShaderCode

Return type:

bool

setEntryPoint(entry)
Parameters:

entryQByteArray

Sets the entry point name.

See also

entryPoint()

setShader(code)
Parameters:

codeQByteArray

Sets the shader source or byte code.

See also

shader()

shader()
Return type:

QByteArray

Returns the shader source or bytecode.

See also

setShader()