QTextureLoader Class

class Qt3DRender::QTextureLoader

テクスチャの読み込みとテクスチャのプロパティの設定を処理します。詳細...

ヘッダー #include <Qt3DRender/QTexture>
CMake.CMake.テクスチャ find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake QT += 3drender
QML で TextureLoader
を継承しています: Qt3DRender::QAbstractTexture
ステータス非推奨

プロパティ

パブリック機能

QTextureLoader(Qt3DCore::QNode *parent = nullptr)
bool isMirrored() const
QUrl source() const

パブリックスロット

void setMirrored(bool mirrored)
void setSource(const QUrl &source)

シグナル

void mirroredChanged(bool mirrored)
void sourceChanged(const QUrl &source)

詳細説明

プロパティの説明

mirrored : bool

このプロパティは、ロード時にテクスチャをミラーリングするかどうかを指定します。これは、レンダリングAPIによって使用されるテクスチャ座標の原点と一致させるために画像を操作する必要がないようにするための便宜的なものです。デフォルトでは、このプロパティはtrueに設定されています。GPU 圧縮テクスチャフォーマットを使用する場合、この効果はありません。

警告 このプロパティは、PNG のような非圧縮または CPU 圧縮のイメージフォーマットをロードするとき、実行時に支払うパフォーマンスの代償となります。このパフォーマンスの代償を避けるには、このプロパティを False に設定し、事前 にミラーリングされたテクスチャ アセットをロードすることをお勧めします。

注: OpenGLはテクスチャ座標の原点を左下隅から指定しますが、DirectXは左上隅を使用します。

注意: キューブマップテクスチャを使用する場合、キューブマップサンプラーは通常のテクスチャ座標ではなく方向を取るため、ミラーリングは無効にした方が良いでしょう。

アクセス関数

bool isMirrored() const
void setMirrored(bool mirrored)

通知シグナル

void mirroredChanged(bool mirrored)

source : QUrl

このプロパティは、現在のテクスチャソースを保持します。

アクセス関数です:

QUrl source() const
void setSource(const QUrl &source)

通知シグナル:

void sourceChanged(const QUrl &source)

メンバ関数ドキュメント

[explicit] QTextureLoader::QTextureLoader(Qt3DCore::QNode *parent = nullptr)

parent を親として新しいQt3DRender::QTextureLoader インスタンスを構築します。

デフォルトでは、ファイルのメタデータに矛盾がなければ、ロードされたテクスチャには次のプロパティが設定されていることに注意してください:- wrapModeをRepeatに設定 - minificationFilterをLinearMipMapLinearに設定 - magnificationFilterをLinearに設定 - generateMipMapsをtrueに設定 - maximumAnisotropyを16.0fに設定 - targetをTargetAutomaticに設定。

[slot] void QTextureLoader::setMirrored(bool mirrored)

ミラーリングをmirrored に設定する。

これは内部的にデータジェネレーターを更新するコールをトリガーする。

注: プロパティmirrored のセッター関数。

isMirrored()も参照

[slot] void QTextureLoader::setSource(const QUrl &source)

テクスチャローダソースをsource設定します。

注意: プロパティsource のセッター関数です。

source()も参照してください

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