QSGD3D11Texture Struct

struct QNativeInterface::QSGD3D11Texture

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

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

パブリック関数

virtual void *nativeTexture() const = 0

静的パブリックメンバー

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

詳細説明

メンバ関数ドキュメント

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

既存の Direct 3D 11texture オブジェクトを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も参照してください

[pure virtual] void *QSGD3D11Texture::nativeTexture() const

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

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