In questa pagina

QShaderKey Class

Specifica il linguaggio di ombreggiatura, la versione con i flag e la variante. Altro...

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

QShaderKey()
QShaderKey(QShader::Source s, const QShaderVersion &sver, QShader::Variant svar = QShader::StandardShader)
void setSource(QShader::Source s)
void setSourceVariant(QShader::Variant svar)
void setSourceVersion(const QShaderVersion &sver)
QShader::Source source() const
QShader::Variant sourceVariant() const
QShaderVersion sourceVersion() const
size_t qHash(const QShaderKey &key, size_t seed = 0)
bool operator!=(const QShaderKey &lhs, const QShaderKey &rhs)
bool operator<(const QShaderKey &lhs, const QShaderKey &rhs)
bool operator==(const QShaderKey &lhs, const QShaderKey &rhs)

Descrizione dettagliata

Un oggetto QShaderKey costruito in modo predefinito ha la proprietà source impostata su SpirvShader e la proprietà sourceVersion impostata su 100. La proprietà sourceVariant è impostata di default su StandardShader.

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

Documentazione delle funzioni membro

[constexpr noexcept default] QShaderKey::QShaderKey()

QShaderKey::QShaderKey(QShader::Source s, const QShaderVersion &sver, QShader::Variant svar = QShader::StandardShader)

Crea un nuovo oggetto `QShaderKey` con tipo di shader ` s`, versione ` sver` e variante ` svar`.

void QShaderKey::setSource(QShader::Source s)

Imposta il tipo di shader s.

Vedi anche source().

void QShaderKey::setSourceVariant(QShader::Variant svar)

Imposta il tipo di variante da utilizzare su svar.

Vedi anche sourceVariant().

void QShaderKey::setSourceVersion(const QShaderVersion &sver)

Imposta la versione del linguaggio di ombreggiatura sver.

Vedi anche sourceVersion().

QShader::Source QShaderKey::source() const

Restituisce il tipo di shader.

Vedi anche setSource().

QShader::Variant QShaderKey::sourceVariant() const

Restituisce il tipo della variante da utilizzare.

Vedi anche setSourceVariant().

QShaderVersion QShaderKey::sourceVersion() const

Restituisce la versione del linguaggio di ombreggiatura.

Vedi anche ` setSourceVersion()`.

Elementi correlati non membri

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

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

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

Restituisce ` false ` se i valori contenuti nei due oggetti ` QShaderKey ` ( lhs e rhs ) sono uguali; in caso contrario, restituisce ` true`.

[noexcept] bool operator<(const QShaderKey &lhs, const QShaderKey &rhs)

Restituisce "true" se lhs è minore di rhs.

Stabilisce un ordine di ordinamento tra le due chiavi lhs e rhs.

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

Restituisce ` true ` se i due oggetti ` QShaderKey `, 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.