QSGMetalTexture Struct

struct QNativeInterface::QSGMetalTexture

メタルテクスチャオブジェクトへのアクセスを提供し、メタルテクスチャオブジェクトを採用できるようにします。詳細...

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

パブリック関数

int nativeTexture() const

静的パブリックメンバー

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

詳細説明

メンバ関数ドキュメント

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

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

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

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

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

テクスチャ属性をカスタマイズするには、options を使用してください。ここでは、TextureHasAlphaChannel と TextureHasMipmaps だけが考慮されます。

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

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

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

QQuickWindow::sceneGraphInitialized(),QSGTexture,Scene Graph - Metal Texture Import,Scene Graph - Vulkan Texture Importも参照してください

int QSGMetalTexture::nativeTexture() const

Metal texture オブジェクトを返します。

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