QShaderCode Class
シェーダーのソースコードまたはバイナリコードと、追加のメタデータが含まれています。詳細...
| ヘッダー: | #include <qshader.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 以下のように: | Qt 6.6 |
パブリック関数
| 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) |
詳細な説明
QShader から QShaderCode インスタンスを取得した後、shader() の戻り値が空の場合、要求されたキーに対応するシェーダーコードが見つからなかったことを示します。
注:これは 互換性の保証が限定的な RHI API です。詳細については、QShader を参照してください。
メンバ関数のドキュメント
[constexpr noexcept default] QShaderCode::QShaderCode()
QShaderCode::QShaderCode(const QByteArray &code, const QByteArray &entry = QByteArray())
指定されたシェーダーソースcode とポイント名entry を使用して、新しいQShaderCodeを構築します。
QByteArray QShaderCode::entryPoint() const
エントリポイント名を返します。
setEntryPoint()も参照してください 。
void QShaderCode::setEntryPoint(const QByteArray &entry)
entry のポイント名を設定します。
「entryPoint()」も参照してください 。
void QShaderCode::setShader(const QByteArray &code)
シェーダーのソースまたはバイトcode を設定します。
shader()も参照してください 。
QByteArray QShaderCode::shader() const
シェーダーのソースまたはバイトコードを返します。
setShader()も参照してください 。
関連する非メンバー関数
[noexcept] size_t qHash(const QShaderCode &key, size_t seed = 0)
`key` のハッシュ値を返します。計算のシードには `seed ` を使用します。
[noexcept] bool operator!=(const QShaderCode &lhs, const QShaderCode &rhs)
2つのQShaderCode オブジェクトlhs とrhs の値が等しい場合はfalse を返し、そうでない場合はtrue を返します。
[noexcept] bool operator==(const QShaderCode &lhs, const QShaderCode &rhs)
2つのQShaderCode オブジェクトlhs とrhs が等しい場合、true を返します。
© 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.