Nesta página

QNativeInterface::QSGVulkanTexture Struct

Oferece acesso a objetos de imagem Vulkan e permite sua adoção. Saiba mais...

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

Funções públicas

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

Membros públicos estáticos

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

Descrição detalhada

Documentação das funções de membro

[constexpr noexcept default] QSGVulkanTexture::QSGVulkanTexture()

Cria, por padrão, uma instância de ` QSGVulkanTexture`.

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

Cria uma instância de ` QSGVulkanTexture` por meio de cópia. Esta função foi excluída.

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

Cria uma instância de ` QSGVulkanTexture` por meio da construção `move`. Essa função foi excluída.

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

Cria um novo objeto ` QSGTexture ` que encapsula um objeto `Vulkan` existente ` image ` para ` window`.

O objeto nativo é encapsulado, mas não pertence, ao objeto ` QSGTexture` resultante. O chamador da função é responsável por excluir o objeto ` QSGTexture` retornado, mas isso não destruirá o objeto nativo subjacente.

Atualmente, esta função é adequada apenas para texturas RGBA 2D.

Aviso: Esta função retornará null se o grafo de cena ainda não tiver sido inicializado.

layout É necessário especificar o layout atual da imagem.

Use ` options ` para personalizar os atributos da textura. Apenas `TextureHasAlphaChannel` e `TextureHasMipmaps` são levados em consideração aqui.

size especifica o tamanho em pixels.

Observação: esta função deve ser chamada na thread de renderização do gráfico de cena.

Esta função foi introduzida no Qt 6.0.

Veja também QQuickWindow::sceneGraphInitialized(), QSGTexture, Gráfico de cena — Importação de textura do Metal e Gráfico de cena — Importação de textura do Vulkan.

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

Retorna o identificador VkImage.

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

Retorna o layout da imagem.

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

A função “Move-assigns” atribui “ other ” a esta instância de “ QSGVulkanTexture ”. Essa função é excluída.

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

Copia e atribui other a esta instância de QSGVulkanTexture. Esta função foi excluída.

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