このページでは

QNativeInterface::QSGMetalTexture Struct

Metalテクスチャオブジェクトへのアクセスを提供し、その採用を可能にします。詳細...

ヘッダー: #include <QSGTexture>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
以下のように: Qt 6.0

パブリック関数

QSGMetalTexture()
QSGMetalTexture(const QNativeInterface::QSGMetalTexture &)
QSGMetalTexture(QNativeInterface::QSGMetalTexture &&)
int nativeTexture() const
QNativeInterface::QSGMetalTexture &operator=(QNativeInterface::QSGMetalTexture &&)
QNativeInterface::QSGMetalTexture &operator=(const QNativeInterface::QSGMetalTexture &)

静的パブリックメンバー

(since 6.0) QSGTexture *fromNative(int texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})

詳細な説明

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

[constexpr noexcept default] QSGMetalTexture::QSGMetalTexture()

QSGMetalTexture のインスタンスをデフォルトコンストラクタで生成します。

[delete] QSGMetalTexture::QSGMetalTexture(const QNativeInterface::QSGMetalTexture &)

QSGMetalTexture のインスタンスをコピーして生成します。この関数は削除されています。

[delete] QSGMetalTexture::QSGMetalTexture(QNativeInterface::QSGMetalTexture &&)

QSGMetalTexture のインスタンスをmove-constructで生成します。この関数は削除されています。

[static, since 6.0] QSGTexture *QSGMetalTexture::fromNative(int texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})

window に対して、既存の Metaltexture オブジェクトをラップする新しいQSGTexture を作成します。

ネイティブオブジェクトは、生成されたQSGTexture によってラップされますが、その所有権は にはありません。関数の呼び出し元は、返されたQSGTexture を削除する責任を負いますが、それによって基になるネイティブオブジェクトが破棄されることはありません。

この関数は現在、2D RGBAテクスチャにのみ適しています。

警告: シーングラフがまだ初期化されていない場合、この関数は null を返します。

options を使用して、テクスチャ属性をカスタマイズしてください。ここでは、TextureHasAlphaChannel および TextureHasMipmaps のみが考慮されます。

size ピクセル単位のサイズを指定します。

注:この関数は 、シーングラフのレンダリングスレッドで呼び出す必要があります。

この関数は Qt 6.0 で導入されました。

関連項目: QQuickWindow::sceneGraphInitialized()、QSGTexture 、シーングラフ - Metal テクスチャのインポート、およびシーングラフ - Vulkan テクスチャのインポート。

int QSGMetalTexture::nativeTexture() const

Metalテクスチャオブジェクトを返します。

[delete] QNativeInterface::QSGMetalTexture &QSGMetalTexture::operator=(QNativeInterface::QSGMetalTexture &&)

other をこのQSGMetalTexture インスタンスにムーブ代入します。この関数は削除されます。

[delete] QNativeInterface::QSGMetalTexture &QSGMetalTexture::operator=(const QNativeInterface::QSGMetalTexture &)

other をこのQSGMetalTexture インスタンスにコピー代入します。この関数は削除されます。

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