In questa pagina

QShaderCode Class

Contiene il codice sorgente o binario di uno shader e metadati aggiuntivi. Maggiori informazioni...

Intestazione: #include <qshader.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
A partire da: Qt 6.6

Funzioni pubbliche

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)

Descrizione dettagliata

Quando shader() restituisce un valore vuoto dopo aver recuperato un'istanza di QShaderCode da QShader, significa che non è stato trovato alcun codice shader per la chiave richiesta.

Nota: si tratta di un'API RHI con garanzie di compatibilità limitate; per ulteriori dettagli, consultare QShader.

Documentazione delle funzioni membro

[constexpr noexcept default] QShaderCode::QShaderCode()

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

Crea un nuovo oggetto `QShaderCode` con il codice sorgente dello shader specificato code e il nome del punto entry.

QByteArray QShaderCode::entryPoint() const

Restituisce il nome del punto di ingresso.

Vedi anche setEntryPoint().

void QShaderCode::setEntryPoint(const QByteArray &entry)

Imposta il nome del punto " entry ".

Vedi anche entryPoint().

void QShaderCode::setShader(const QByteArray &code)

Imposta la sorgente dello shader o l'code e di byte.

Vedi anche ` shader()`.

QByteArray QShaderCode::shader() const

Restituisce il codice sorgente dello shader o il bytecode.

Vedi anche setShader().

Elementi correlati non membri

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

Restituisce il valore hash per key, utilizzando seed come seme per il calcolo.

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

Restituisce " false " se i valori contenuti nei due oggetti " QShaderCode " lhs e rhs sono uguali; altrimenti restituisce " true".

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

Restituisce ` true ` se i due oggetti ` QShaderCode `, ovvero ` lhs ` e ` rhs `, sono uguali.

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