QSGTextureMaterial Class
QSGTextureMaterial クラスは、シーングラフ内でテクスチャ付きジオメトリをレンダリングするための便利な手段を提供します。詳細...
| ヘッダー: | #include <QSGTextureMaterial> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| 継承元: | QSGOpaqueTextureMaterial |
- 継承されたメンバを含むすべてのメンバの一覧
- QSGTextureMaterialは、Qt Quick のシーングラフマテリアルクラスの一部です。
詳細な説明
警告: この ユーティリティクラスは、Qt Quick シーングラフのデフォルトバックエンドで実行している場合にのみ機能します。
テクスチャ付きマテリアルは、ジオメトリのすべてのピクセルを指定されたテクスチャで塗りつぶします。
テクスチャマテリアルでレンダリングされるジオメトリには、属性位置 0 に頂点、属性位置 1 にテクスチャ座標が必要です。テクスチャ座標は、2 次元の浮動小数点型タプルです。QSGGeometry::defaultAttributes_TexturedPoint2D は、このマテリアルと互換性のある属性セットを返します。
レンダリングするテクスチャは、setTexture() を使用して設定できます。テクスチャのレンダリング方法は、setMipmapFiltering()、setFiltering()、setHorizontalWrapMode()、およびsetVerticalWrapMode() を使用して指定できます。レンダリング状態は、テクスチャインスタンスがバインドされる直前に設定されます。
テクスチャ付きマテリアルは、テクスチャの現在のマトリクスおよびアルファチャンネルを反映します。また、シーングラフ内で蓄積された不透明度も反映します。
テクスチャマテリアルをシーングラフ内でマテリアルとして使用する前に、テクスチャを設定しておく必要があります。
© 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.