Nesta página

QNativeInterface::QSGD3D11Texture Struct

Oferece acesso e permite a adoção de objetos de textura do Direct3D 11. 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

QSGD3D11Texture()
QSGD3D11Texture(const QNativeInterface::QSGD3D11Texture &)
QSGD3D11Texture(QNativeInterface::QSGD3D11Texture &&)
virtual void *nativeTexture() const = 0
QNativeInterface::QSGD3D11Texture &operator=(QNativeInterface::QSGD3D11Texture &&)
QNativeInterface::QSGD3D11Texture &operator=(const QNativeInterface::QSGD3D11Texture &)

Membros públicos estáticos

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

Descrição detalhada

Documentação das funções de membro

[constexpr noexcept default] QSGD3D11Texture::QSGD3D11Texture()

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

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

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

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

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

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

Cria um novo objeto ` QSGTexture ` que encapsula um objeto ` texture ` do Direct 3D 11 já 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. 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`, “Grafo de cena — Importação de textura do Metal” e “Grafo de cena — Importação de textura do Vulkan”.

[pure virtual] void *QSGD3D11Texture::nativeTexture() const

Retorna o objeto ID3D11Texture2D.

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

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

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

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