このページでは

QSGVertexColorMaterial Class

QSGVertexColorMaterial クラスは、シーングラフ内で頂点ごとに色付けされたジオメトリをレンダリングするための便利な方法を提供します。詳細...

ヘッダー: #include <QSGVertexColorMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
継承元: QSGMaterial

パブリック関数

詳細な説明

警告: この ユーティリティクラスは、Qt Quick シーングラフのデフォルトバックエンドで実行している場合にのみ機能します。

頂点カラーマテリアルは、ジオメトリ内の各頂点に色を割り当てます。頂点間のピクセルは線形補間されます。色には透明度を含めることができます。

頂点カラーでレンダリングされるジオメトリは、以下のレイアウトを持つ必要があります。属性位置 0 には頂点が含まれている必要があります。 属性位置 1 には、RGBA レイアウトの 4 つの値からなるタプルである色が含まれている必要があります。色値としては、0 から 1 の範囲の浮動小数点数および 0 から 255 の範囲の符号なしバイトが有効です。

注: レンダリングパイプラインは 、プリマルチプライドアルファを持つピクセルを想定しています。

QSGGeometry::defaultAttributes_ColoredPoint2D() を使用すると、このマテリアルと互換性のある属性セットを構築できます。

頂点カラーマテリアルは、レンダリング状態を更新する際に、現在の不透明度と現在のマトリックスの両方を尊重します。

メンバ関数のドキュメント

QSGVertexColorMaterial::QSGVertexColorMaterial()

新しい頂点カラーマテリアルを作成します。

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