Nesta página

QNativeInterface::QSGMetalTexture Struct

Oferece acesso a objetos de textura “Metal” e permite sua adoção. 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

QSGMetalTexture()
QSGMetalTexture(const QNativeInterface::QSGMetalTexture &)
QSGMetalTexture(QNativeInterface::QSGMetalTexture &&)
int nativeTexture() const
QNativeInterface::QSGMetalTexture &operator=(QNativeInterface::QSGMetalTexture &&)
QNativeInterface::QSGMetalTexture &operator=(const QNativeInterface::QSGMetalTexture &)

Membros públicos estáticos

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

Descrição detalhada

Documentação das funções de membro

[constexpr noexcept default] QSGMetalTexture::QSGMetalTexture()

Constrói, por padrão, uma instância de ` QSGMetalTexture`.

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

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

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

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

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

Cria um novo objeto ` QSGTexture ` que envolve um objeto `Metal texture ` existente para ` window`.

O objeto nativo é encapsulado, mas não pertence ao QSGTexture resultante. O chamador da função é responsável por excluir o 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.

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

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`, “Grafo de cena — Importação de textura do Metal” e “Grafo de cena — Importação de textura do Vulkan”.

int QSGMetalTexture::nativeTexture() const

Retorna o objeto de textura “Metal”.

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

A função “Move” atribui o objeto ` other ` a esta instância ` QSGMetalTexture `. Essa função é excluída.

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

Copia e atribui other a esta instância de QSGMetalTexture. 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.