QSGD3D12Texture Struct

struct QNativeInterface::QSGD3D12Texture

Ermöglicht den Zugriff auf und die Übernahme von Direct3D 12-Texturobjekten. Mehr...

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

Öffentliche Funktionen

virtual void *nativeTexture() const = 0

Statische öffentliche Mitglieder

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

Detaillierte Beschreibung

Dokumentation der Mitgliedsfunktionen

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

Erzeugt ein neues QSGTexture, das ein vorhandenes Direct 3D 12 texture Objekt für window umhüllt.

Das native Objekt wird von dem resultierenden QSGTexture umhüllt, gehört ihm aber nicht. Der Aufrufer der Funktion ist dafür verantwortlich, das zurückgegebene QSGTexture zu löschen, aber das zugrunde liegende native Objekt wird dadurch nicht zerstört.

Diese Funktion ist derzeit nur für 2D-RGBA-Texturen geeignet.

Warnung: Diese Funktion gibt null zurück, wenn der Szenegraph noch nicht initialisiert wurde.

Verwenden Sie options, um die Texturattribute anzupassen. Hier werden nur die TextureHasAlphaChannel und TextureHasMipmaps berücksichtigt.

size gibt die Größe in Pixeln an.

resourceState muss den aktuellen Zustand der Textur-Ressource angeben.

Hinweis: Diese Funktion muss im Rendering-Thread des Szenegraphen aufgerufen werden.

Diese Funktion wurde in Qt 6.6 eingeführt.

Siehe auch QQuickWindow::sceneGraphInitialized(), QSGTexture, Scene Graph - Metal Texture Import, und Scene Graph - Vulkan Texture Import.

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

Gibt das ID3D12Texture-Objekt zurück.

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