In questa pagina

QNativeInterface::QSGD3D11Texture Struct

Consente l'accesso agli oggetti texture Direct3D 11 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

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

Membri pubblici statici

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

Descrizione dettagliata

Documentazione delle funzioni membro

[constexpr noexcept default] QSGD3D11Texture::QSGD3D11Texture()

Crea un'istanza di ` QSGD3D11Texture` con i valori predefiniti.

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

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

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

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

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

Crea un nuovo oggetto ` QSGTexture ` che incapsula un oggetto ` texture ` esistente di Direct 3D 11 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.

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

Restituisce l'oggetto ID3D11Texture2D.

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

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

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

Copia e assegna other a questa istanza di QSGD3D11Texture. 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.