In questa pagina

QNativeInterface::QSGMetalTexture Struct

Consente l'accesso agli oggetti con texture "Metal" e ne permette l'adozione. Altro...

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

Funzioni pubbliche

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

Membri pubblici statici

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

Descrizione dettagliata

Documentazione delle funzioni dei membri

[constexpr noexcept default] QSGMetalTexture::QSGMetalTexture()

Crea automaticamente un'istanza di ` QSGMetalTexture`.

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

Crea una copia di un'istanza di ` QSGMetalTexture`. Questa funzione è stata eliminata.

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

Crea un'istanza di ` QSGMetalTexture`. Questa funzione è stata eliminata.

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

Crea un nuovo oggetto ` QSGTexture ` che incapsula un oggetto `Metal` esistente texture per ` window`.

L'oggetto nativo viene incapsulato, ma non gestito, dall'QSGTexture risultante. Chi chiama la funzione è responsabile dell'eliminazione dell'QSGTexture restituito, ma ciò non distruggerà l'oggetto nativo sottostante.

Questa funzione è attualmente adatta solo per texture RGBA 2D.

Attenzione: questa funzione restituirà `null` se il grafo della scena non è stato ancora inizializzato.

Utilizzare ` options ` per personalizzare gli attributi della texture. In questo contesto vengono presi in considerazione solo `TextureHasAlphaChannel` e `TextureHasMipmaps`.

size Specifica la dimensione in pixel.

Nota: questa funzione deve essere chiamata sul thread di rendering del grafo di scena.

Questa funzione è stata introdotta in Qt 6.0.

Vedi anche ` QQuickWindow::sceneGraphInitialized()`, ` QSGTexture` , Grafo di scena - Importazione di texture Metal e Grafo di scena - Importazione di texture Vulkan.

int QSGMetalTexture::nativeTexture() const

Restituisce l'oggetto texture Metal.

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

Assegna " other " a questa istanza di " QSGMetalTexture ". Questa funzione viene eliminata.

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

Copia e assegna other a questa istanza di QSGMetalTexture. Questa funzione viene eliminata.

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