QNativeInterface::QSGVulkanTexture Struct
Proporciona acceso y permite adoptar objetos de imagen Vulkan. 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 |
- Lista de todos los miembros, incluyendo los heredados
- QSGVulkanTexture es parte de Interfaces Nativas.
Funciones Públicas
| virtual VkImage | nativeImage() const = 0 |
| virtual VkImageLayout | nativeImageLayout() const = 0 |
Miembros Públicos Estáticos
(since 6.0) QSGTexture * | fromNative(VkImage image, VkImageLayout layout, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {}) |
Documentación de la Función Miembro
[static, since 6.0] QSGTexture *QSGVulkanTexture::fromNative(VkImage image, VkImageLayout layout, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})
Crea un nuevo QSGTexture envolviendo un objeto Vulkan image 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.
layout debe especificar el diseño actual de la imagen.
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.
[pure virtual] VkImage QSGVulkanTexture::nativeImage() const
Devuelve el manejador de la VkImage.
[pure virtual] VkImageLayout QSGVulkanTexture::nativeImageLayout() const
Devuelve el diseño de la imagen.
© 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.