QShaderCode Class
Contains source or binary code for a shader and additional metadata. More...
Header: | #include <QShaderCode> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
Since: | Qt 6.6 |
Public Functions
QShaderCode() | |
QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray()) | |
QByteArray | entryPoint() const |
void | setEntryPoint(const QByteArray &entry) |
void | setShader(const QByteArray &code) |
QByteArray | shader() const |
Related Non-Members
size_t | qHash(const QShaderCode &key, size_t seed = 0) |
bool | operator!=(const QShaderCode &lhs, const QShaderCode &rhs) |
bool | operator==(const QShaderCode &lhs, const QShaderCode &rhs) |
Detailed Description
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.
Member Function Documentation
[constexpr noexcept]
QShaderCode::QShaderCode()
QShaderCode::QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray())
Constructs a new QShaderCode with the specified shader source code and entry point name.
QByteArray QShaderCode::entryPoint() const
Returns the entry point name.
See also setEntryPoint().
void QShaderCode::setEntryPoint(const QByteArray &entry)
Sets the entry point name.
See also entryPoint().
void QShaderCode::setShader(const QByteArray &code)
Sets the shader source or byte code.
See also shader().
QByteArray QShaderCode::shader() const
Returns the shader source or bytecode.
See also setShader().
Related Non-Members
[noexcept]
size_t qHash(const QShaderCode &key, size_t seed = 0)
Returns the hash value for key, using seed to seed the calculation.
[noexcept]
bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs)
Returns false
if the values in the two QShaderCode objects lhs and rhs are equal; otherwise returns true
.
[noexcept]
bool operator==(const QShaderCode &lhs, const QShaderCode &rhs)
Returns true
if the two QShaderCode objects lhs and rhs are equal.
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.