En esta página

QShaderCode Class

Contiene el código fuente o binario de un sombreador y metadatos adicionales. Más...

Cabecera: #include <QShaderCode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Desde: Qt 6.6

Funciones Públicas

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
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)

Descripción Detallada

Cuando shader() está vacío después de recuperar una instancia de QShaderCode de QShader, indica que no se encontró ningún código de sombreado para la clave solicitada.

Nota: Esta es una API RHI con garantías de compatibilidad limitadas, ver QShader para más detalles.

Documentación de las funciones miembro

[constexpr noexcept] QShaderCode::QShaderCode()

QShaderCode::QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray())

Construye un nuevo QShaderCode con la fuente del shader code y el nombre del punto entry especificados.

QByteArray QShaderCode::entryPoint() const

Devuelve el nombre del punto de entrada.

Véase también setEntryPoint().

void QShaderCode::setEntryPoint(const QByteArray &entry)

Establece el nombre del punto entry.

Véase también entryPoint().

void QShaderCode::setShader(const QByteArray &code)

Establece la fuente del shader o byte code.

Véase también shader().

QByteArray QShaderCode::shader() const

Devuelve el código fuente o bytecode del shader.

Véase también setShader().

No miembros relacionados

[noexcept] size_t qHash(const QShaderCode &key, size_t seed = 0)

Devuelve el valor hash para key, utilizando seed para sembrar el cálculo.

[noexcept] bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs)

Devuelve false si los valores de los dos objetos QShaderCode lhs y rhs son iguales; en caso contrario devuelve true.

[noexcept] bool operator==(const QShaderCode &lhs, const QShaderCode &rhs)

Devuelve true si los dos objetos QShaderCode lhs y rhs son iguales.

© 2026 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.