Auf dieser Seite

QNativeInterface::QSGVulkanTexture Struct

Bietet Zugriff auf Vulkan-Bildobjekte und ermöglicht deren Übernahme. Mehr...

Header: #include <QSGTexture>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
Seit: Qt 6.0

Öffentliche Funktionen

QSGVulkanTexture()
QSGVulkanTexture(const QNativeInterface::QSGVulkanTexture &)
QSGVulkanTexture(QNativeInterface::QSGVulkanTexture &&)
virtual VkImage nativeImage() const = 0
virtual VkImageLayout nativeImageLayout() const = 0
QNativeInterface::QSGVulkanTexture &operator=(QNativeInterface::QSGVulkanTexture &&)
QNativeInterface::QSGVulkanTexture &operator=(const QNativeInterface::QSGVulkanTexture &)

Statische öffentliche Mitglieder

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

Ausführliche Beschreibung

Dokumentation der Mitgliedsfunktionen

[constexpr noexcept default] QSGVulkanTexture::QSGVulkanTexture()

Erstellt standardmäßig eine Instanz von ` QSGVulkanTexture`.

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

Erstellt eine Instanz von ` QSGVulkanTexture` durch Kopieren. Diese Funktion wurde gelöscht.

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

Erzeugt eine Instanz von ` QSGVulkanTexture`. Diese Funktion ist gelöscht.

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

Erstellt ein neues ` QSGTexture `, das ein vorhandenes `Vulkan`-Objekt vom Typ ` image ` für ` window` umhüllt.

Das native Objekt wird von dem resultierenden ` QSGTexture` umschlossen, gehört diesem jedoch nicht. Der Aufrufer der Funktion ist dafür verantwortlich, das zurückgegebene ` QSGTexture` zu löschen, wodurch das zugrunde liegende native Objekt jedoch nicht zerstört wird.

Diese Funktion eignet sich derzeit nur für 2D-RGBA-Texturen.

Warnung: Diese Funktion gibt null zurück, wenn der Szenengraph noch nicht initialisiert wurde.

layout muss das aktuelle Layout des Bildes angeben.

Verwenden Sie ` options `, um die Texturattribute anzupassen. Dabei werden hier nur `TextureHasAlphaChannel` und `TextureHasMipmaps` berücksichtigt.

size Gibt die Größe in Pixeln an.

Hinweis: Diese Funktion muss im Rendering-Thread des Szenengraphen aufgerufen werden.

Diese Funktion wurde in Qt 6.0 eingeführt.

Siehe auch „ QQuickWindow::sceneGraphInitialized()“, „ QSGTexture “, „Szenengraph – Metal-Texturimport“ und „Szenengraph – Vulkan-Texturimport“.

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

Gibt das VkImage-Handle zurück.

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

Gibt das Bildlayout zurück.

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

Weist „ other “ dieser „ QSGVulkanTexture “-Instanz zu. Diese Funktion wird gelöscht.

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

other Weist dieser „ QSGVulkanTexture “-Instanz „ “ per Kopierzuweisung zu. Diese Funktion wird gelöscht.

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