En esta página

QNativeInterface::QSGD3D12Texture Struct

Permite acceder a los objetos de textura de Direct3D 12 y facilita su adopción. Más información...

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

Funciones públicas

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

Miembros públicos estáticos

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

Descripción detallada

Documentación de las funciones de miembro

[constexpr noexcept default] QSGD3D12Texture::QSGD3D12Texture()

Crea por defecto una instancia de ` QSGD3D12Texture`.

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

Crea una instancia de ` QSGD3D12Texture` mediante copia. Esta función se ha eliminado.

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

Crea una instancia de ` QSGD3D12Texture` mediante «move». Esta función se ha eliminado.

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

Crea un nuevo objeto ` QSGTexture ` que envuelve un objeto ` texture ` de Direct 3D 12 ya existente para ` window`.

El objeto nativo queda envuelto, pero no es propiedad, del objeto ` QSGTexture` resultante. Quien invoca la función es responsable de eliminar el objeto ` QSGTexture` devuelto, pero ello no destruirá el objeto nativo subyacente.

Actualmente, esta función solo es apta para texturas RGBA en 2D.

Advertencia: Esta función devolverá «null» si el grafo de escena aún no se ha inicializado.

Utiliza ` options ` para personalizar los atributos de la textura. Aquí solo se tienen en cuenta `TextureHasAlphaChannel` y `TextureHasMipmaps`.

size especifica el tamaño en píxeles.

resourceState Debe especificar el estado actual del recurso de textura.

Nota: Esta función debe llamarse en el hilo de renderizado del grafo de escena.

Esta función se introdujo en Qt 6.6.

Véase también QQuickWindow::sceneGraphInitialized(), QSGTexture, «Grafo de escena: importación de texturas Metal» y «Grafo de escena: importación de texturas Vulkan».

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

Devuelve el objeto ID3D12Texture.

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

Asigna « other » a esta instancia de « QSGD3D12Texture ». Esta función se elimina.

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

Asigna por copia other a esta instancia de QSGD3D12Texture. Esta función se ha eliminado.

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