QShaderKey Class

シェーディング言語、フラグ付きバージョン、バリアントを指定します。さらに...

ヘッダ #include <QShaderKey>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
以来:Qt 6.6

パブリック関数

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)

詳細説明

デフォルトで構築される QShaderKey は、ソースが SpirvShader に設定され、sourceVersion が 100 に設定されます。sourceVariant のデフォルトは StandardShader です。

注意: これは互換性が限定的に保証された RHI API です。詳細はQShader を参照してください。

メンバ関数ドキュメント

[constexpr noexcept] QShaderKey::QShaderKey()

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

シェーダタイプs 、バージョンsver 、バリアントsvar を持つ新しい QShaderKey を構築します。

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

シェーダー・タイプを設定するs

source()も参照

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

使用するバリアントのタイプをsvar に設定します。

sourceVariant()も参照

void QShaderKey::setSourceVersion(const QShaderVersion &sver)

シェーディング言語バージョンsver を設定します。

sourceVersion()も参照

QShader::Source QShaderKey::source() const

シェーダタイプを返します。

setSource()も参照

QShader::Variant QShaderKey::sourceVariant() const

使用するバリアントの型を返します。

setSourceVariant()も参照 ください。

QShaderVersion QShaderKey::sourceVersion() const

シェーディング言語のバージョンを返します。

setSourceVersion()も参照 ください。

関連する非会員

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

key のハッシュ値を返す。計算のシードにはseed を使用する。

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

2つのQShaderKey オブジェクトlhsrhs の値が等しい場合はfalse を返し、そうでない場合はtrue を返す。

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

lhsrhs より小さい場合に真を返す。

2つのキーlhsrhs の間のソート順を確立する。

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

2つのQShaderKey オブジェクトlhsrhs が等しい場合、true を返す。

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