Parameter QML Type
名前と値のペアを格納します。これはシェーダーのユニフォームに対応します。詳細...
| Import Statement: | import Qt3D.Render 2.12 |
| In C++: | QParameter |
| Status: | Deprecated |
この型は非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
詳細説明
パラメータは、RenderPass 、Technique、Effect、Material、TechniqueFilter 、RenderPassFilter から参照できます。実行時、レンダリングの特定のステップでどのシェーダーが選択されているかによって、そのシェーダーにパラメータ名と一致する名前のユニフォームが含まれている場合、パラメータに含まれる値は変換されてアップロードされます。
Parameter {
name: "diffuseColor"
value: "blue"
}
// Works with the following GLSL uniform shader declarations
// uniform vec4 diffuseColor;
// uniform vec3 diffuseColor;
// uniform vec2 diffuseColor;
// uniform float diffuseColor;注: パラメータでラップされた値が、実際のユニフォームが期待する形式に確実に変換できるかどうかを確認するために、ある程度の 注意が必要です。実際のシェーダーのユニフォームが float 型であるにもかかわらず、int として格納された値を指定すると、未定義の挙動を引き起こす可能性があります。
注: 対象となるユニフォームが配列の場合 、名前にはユニフォームの名前の末尾に [0] を付加したものを指定する必要があります。
注:Parameter ノードは無効にすることはできません。
Parameter {
name: "diffuseValues[0]"
value: [0.0, 1.0. 2.0, 3.0, 4.0, 883.0, 1340.0, 1584.0]
}
// Matching GLSL shader uniform declaration
// uniform float diffuseValues[8];テクスチャのサポートに関しては、パラメータの値を、シェーダーのユニフォームのサンプラー型と一致する適切なtexture サブクラスに設定する必要があります。
Parameter {
name: "diffuseTexture"
value: Texture2D { ... }
}
// Works with the following GLSL uniform shader declaration
// uniform sampler2D diffuseTexture「Qt3DRender::QAbstractTexture」も参照してください 。
プロパティのドキュメント
name : string
パラメータの名前を指定します
value : QVariant
パラメータの値を指定します
© 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.