このページでは

Qt3DRender::QTextureImage Class

class Qt3DRender::QTextureImage

画像ソースから OpenGL テクスチャ画像を作成するために必要な情報をカプセル化しています。詳細...

ヘッダー: #include <qtextureimage.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML内: TextureImage
継承元: Qt3DRender::QAbstractTextureImage
ステータス: 非推奨

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

パブリック型

enum Status { None, Loading, Ready, Error }

プロパティ

パブリック関数

QTextureImage(Qt3DCore::QNode *parent = nullptr)
bool isMirrored() const
QUrl source() const
Qt3DRender::QTextureImage::Status status() const

パブリックスロット

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

シグナル

void mirroredChanged(bool mirrored)
void sourceChanged(const QUrl &source)
void statusChanged(Qt3DRender::QTextureImage::Status status)

保護された関数

void setStatus(Qt3DRender::QTextureImage::Status status)

詳細な説明

OpenGL テクスチャにデータを適切な場所に読み込むために必要な情報(mipmap レベル、レイヤー、キューブ面、ソース URL)が含まれています。

メンバ型のドキュメント

enum QTextureImage::Status

この列挙型は、テクスチャ画像の読み込みに関するステータス値を指定します。

定数値説明
Qt3DRender::QTextureImage::None0テクスチャ画像の読み込みはまだ開始されていません。
Qt3DRender::QTextureImage::Loading1テクスチャ画像の読み込みは開始されていますが、まだ完了していません。
Qt3DRender::QTextureImage::Ready2テクスチャ画像の読み込みが完了しました。
Qt3DRender::QTextureImage::Error3テクスチャ画像の読み込み中にエラーが発生しました。

プロパティのドキュメント

mirrored : bool

このプロパティは、画像の読み込み時に画像を反転させるかどうかを指定します。これは、レンダリング API が使用するテクスチャ座標の原点に合わせて画像を調整する手間を省くための機能です。デフォルトでは、このプロパティは true に設定されています。GPU 圧縮テクスチャ形式を使用している場合、この設定は効果を持ちません。

警告:この プロパティを設定すると、PNGなどの非圧縮またはCPU圧縮された画像形式を読み込む際に、実行時のパフォーマンス低下を招きます。このパフォーマンス低下を避けるには、このプロパティをfalseに設定し、あらかじめ反転処理済みのテクスチャアセットを読み込むことをお勧めします。

注:OpenGLでは テクスチャ座標の原点が左下隅と規定されていますが、DirectXでは左上隅が使用されます。

注: キューブマップテクスチャを使用する場合、 キューブマップサンプラーは通常のテクスチャ座標ではなく方向を指定するため、ミラーリングを無効にすることをお勧めします。

アクセス関数:

bool isMirrored() const
void setMirrored(bool mirrored)

通知シグナル:

void mirroredChanged(bool mirrored)

source : QUrl

このプロパティには、テクスチャ画像のデータを読み込む元のURLが格納されます。

アクセス関数:

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

通知シグナル:

void sourceChanged(const QUrl &source)

[read-only] status : Status

このプロパティは、テクスチャ画像の読み込み状況を保持します。

  • TextureImage.None
  • TextureImage.Loading
  • TextureImage.Ready
  • TextureImage.Error

アクセス関数:

Qt3DRender::QTextureImage::Status status() const

Notifier シグナル:

void statusChanged(Qt3DRender::QTextureImage::Status status)

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

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

parent を親として、新しいQt3DRender::QTextureImage インスタンスを作成します。

bool QTextureImage::isMirrored() const

ミラーリングが有効かどうかを返します。

注: プロパティ `mirrored`のゲッター 関数です。

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

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

注:これにより 、内部的にデータジェネレータの更新が呼び出されます。

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

isMirrored()も参照してください 。

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

テクスチャ画像のソースURLをsource に設定します。

注:これにより 、内部的にデータジェネレータの更新が呼び出されます。

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

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

[protected] void QTextureImage::setStatus(Qt3DRender::QTextureImage::Status status)

ステータスを「status 」に設定します。status

status()も参照してください 。

QUrl QTextureImage::source() const

テクスチャ画像のデータを読み込む元のURLを返します。

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

関連項目: setSource()。

Qt3DRender::QTextureImage::Status QTextureImage::status() const

現在のステータスを返します。

注: プロパティ statusのゲッター 関数です。

関連項目: setStatus()。

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