En esta página

QNativeInterface::QSGMetalTexture Struct

Proporciona acceso y permite adoptar objetos de textura Metal. Más...

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

Funciones Públicas

int nativeTexture() const

Miembros Públicos Estáticos

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

Descripción Detallada

Documentación de las funciones de los miembros

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

Crea un nuevo QSGTexture envolviendo un objeto Metal texture existente para window.

El objeto nativo está envuelto, pero no es propiedad, del QSGTexture resultante. La persona que llama a la función es responsable de borrar el QSGTexture devuelto, pero eso no destruirá el objeto nativo subyacente.

Esta función sólo es adecuada para texturas 2D RGBA.

Advertencia: Esta función devolverá null si el gráfico de escena aún no ha sido inicializado.

Utilice options para personalizar los atributos de la textura. Aquí sólo se tienen en cuenta TextureHasAlphaChannel y TextureHasMipmaps.

size especifica el tamaño en píxeles.

Nota: Esta función debe ser llamada en el hilo de renderizado del gráfico de escena.

Esta función se introdujo en Qt 6.0.

Véase también QQuickWindow::sceneGraphInitialized(), QSGTexture, Gráfico de escena - Importación de texturas metálicas, y Gráfico de escena - Importación de texturas Vulkan.

int QSGMetalTexture::nativeTexture() const

Devuelve el objeto Textura metálica.

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