In questa pagina

QNativeInterface::QSGVulkanTexture Struct

Consente l'accesso agli oggetti immagine Vulkan e ne permette l'adozione. Per saperne di più...

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

Funzioni pubbliche

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 &)

Membri pubblici statici

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

Descrizione dettagliata

Documentazione delle funzioni membro

[constexpr noexcept default] QSGVulkanTexture::QSGVulkanTexture()

Crea un'istanza di ` QSGVulkanTexture` con i valori predefiniti.

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

Crea un'istanza di ` QSGVulkanTexture` tramite copia. Questa funzione è stata eliminata.

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

Crea un’istanza di ` QSGVulkanTexture` tramite `move`. Questa funzione è stata eliminata.

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

Crea un nuovo oggetto ` QSGTexture ` che incapsula un oggetto ` image ` di Vulkan esistente per ` window`.

L'oggetto nativo viene incapsulato, ma non gestito, dall'QSGTexture risultante. Chi chiama la funzione è responsabile dell'eliminazione dell'QSGTexture restituito, ma ciò non distruggerà l'oggetto nativo sottostante.

Questa funzione è attualmente adatta solo per le texture RGBA 2D.

Attenzione: questa funzione restituirà `null` se il grafo di scena non è stato ancora inizializzato.

layout È necessario specificare il layout corrente dell’immagine.

Utilizzare options per personalizzare gli attributi della texture. Qui vengono presi in considerazione solo TextureHasAlphaChannel e TextureHasMipmaps.

size Specifica la dimensione in pixel.

Nota: questa funzione deve essere chiamata sul thread di rendering del grafo di scena.

Questa funzione è stata introdotta in Qt 6.0.

Vedi anche QQuickWindow::sceneGraphInitialized(), QSGTexture, Grafo di scena - Importazione di texture Metal e Grafo di scena - Importazione di texture Vulkan.

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

Restituisce l'handle di VkImage.

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

Restituisce il layout dell'immagine.

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

Assegna " other " a questa istanza di " QSGVulkanTexture ". Questa funzione viene eliminata.

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

Copia e assegna other a questa istanza di QSGVulkanTexture. Questa funzione viene eliminata.

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