QSGVulkanTexture Struct

struct QNativeInterface::QSGVulkanTexture

Vulkan画像オブジェクトへのアクセスを提供し、Vulkan画像オブジェクトの採用を可能にします。詳細...

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

パブリック関数

virtual VkImage nativeImage() const = 0
virtual VkImageLayout nativeImageLayout() const = 0

静的パブリックメンバー

(since 6.0) QSGTexture *fromNative(VkImage image, VkImageLayout layout, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})

詳細説明

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

[static, since 6.0] QSGTexture *QSGVulkanTexture::fromNative(VkImage image, VkImageLayout layout, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})

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

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

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

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

layout は、イメージの現在のレイアウトを指定する必要があります。

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

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

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

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

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

[pure virtual] VkImage QSGVulkanTexture::nativeImage() const

VkImage ハンドルを返します。

[pure virtual] VkImageLayout QSGVulkanTexture::nativeImageLayout() const

画像のレイアウトを返します。

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