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()

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

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