QSGTextureMaterial Class

QSGTextureMaterial クラスは、シーングラフでテクスチャ付きジオメトリをレンダリングする便利な方法を提供します。詳細...

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

詳しい説明

警告 このユーティリティクラスは、Qt Quick scenegraph のデフォルトバックエンドで実行するときのみ機能します。

テクスチャ マテリアルは、与えられたテクスチャでジオメトリ内のすべてのピクセルを塗りつぶします。

テクスチャ マテリアルでレンダリングするジオメトリには、アトリビュート ロケーション 0 の頂点と、アトリビュート ロケーション 1 のテクスチャ座標が必要です。テクスチャ座標は 2 次元の浮動小数点タプルです。QSGGeometry::defaultAttributes_TexturedPoint2D は、このマテリアルと互換性のある属性セットを返します。

レンダリングするテクスチャはsetTexture() を使って設定できます。テクスチャのレンダリング方法は、setMipmapFiltering()、setFiltering()、setHorizontalWrapMode()、setVerticalWrapMode() を使用して指定できます。レンダリング状態は、テクスチャインスタンスがバインドされる直前に設定されます。

テクスチャマテリアルは、現在のマトリックスとテクスチャのアルファチャンネルを尊重します。また、シーングラフの累積不透明度も尊重されます。

テクスチャマテリアルは、シーングラフでマテリアルとして使用される前に、テクスチャが設定されていなければなりません。

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