QShaderKey Class
Especifica a linguagem de sombreamento, a versão com sinalizadores e a variante. Mais...
| Cabeçalho: | #include <qshader.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Desde: | Qt 6.6 |
Funções públicas
| 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 |
Não-membros relacionados
| 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) |
Descrição detalhada
Um QShaderKey construído por padrão tem a fonte definida como SpirvShader e o parâmetro “ sourceVersion ” definido como 100. O parâmetro “ sourceVariant ” é definido por padrão como StandardShader.
Observação: Esta é uma API RHI com garantias de compatibilidade limitadas; consulte QShader para obter detalhes.
Documentação das funções de membro
[constexpr noexcept default] QShaderKey::QShaderKey()
QShaderKey::QShaderKey(QShader::Source s, const QShaderVersion &sver, QShader::Variant svar = QShader::StandardShader)
Cria um novo objeto `QShaderKey` com o tipo de shader ` s`, a versão ` sver` e a variante ` svar`.
void QShaderKey::setSource(QShader::Source s)
Define o tipo de shader s.
Veja também source().
void QShaderKey::setSourceVariant(QShader::Variant svar)
Define o tipo de variante a ser usado como “ svar ”.
Veja também sourceVariant().
void QShaderKey::setSourceVersion(const QShaderVersion &sver)
Define a versão da linguagem de sombreamento sver.
Veja também sourceVersion().
QShader::Source QShaderKey::source() const
Retorna o tipo do shader.
Veja também setSource().
QShader::Variant QShaderKey::sourceVariant() const
Retorna o tipo da variante a ser utilizada.
Veja também setSourceVariant().
QShaderVersion QShaderKey::sourceVersion() const
Retorna a versão da linguagem de sombreamento.
Veja também ` setSourceVersion()`.
Não-membros relacionados
[noexcept] size_t qHash(const QShaderKey &key, size_t seed = 0)
Retorna o valor hash de key, utilizando seed como semente para o cálculo.
[noexcept] bool operator!=(const QShaderKey &lhs, const QShaderKey &rhs)
Retorna ` false ` se os valores nos dois objetos ` QShaderKey ` — ` lhs ` e ` rhs ` — forem iguais; caso contrário, retorna ` true`.
[noexcept] bool operator<(const QShaderKey &lhs, const QShaderKey &rhs)
Retorna “true” se lhs for menor que rhs.
Estabelece uma ordem de classificação entre as duas chaves lhs e rhs.
[noexcept] bool operator==(const QShaderKey &lhs, const QShaderKey &rhs)
Retorna ` true ` se os dois objetos ` QShaderKey ` — ` lhs ` e ` rhs ` — forem iguais.
© 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.