QSGD3D11Texture Struct
struct QNativeInterface::QSGD3D11TextureErmöglicht den Zugriff auf und die Übernahme von Direct3D 11-Texturobjekten. Mehr...
Header: | #include <QSGTexture> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
qmake: | QT += quick |
Seit: | Qt 6.0 |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QSGD3D11Texture ist Teil der Native Interfaces.
Öffentliche Funktionen
virtual void * | nativeTexture() const = 0 |
Statische öffentliche Mitglieder
(since 6.0) QSGTexture * | fromNative(void *texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {}) |
Dokumentation der Mitgliedsfunktionen
[static, since 6.0]
QSGTexture *QSGD3D11Texture::fromNative(void *texture, QQuickWindow *window, const QSize &size, QQuickWindow::CreateTextureOptions options = {})
Erzeugt ein neues QSGTexture, das ein vorhandenes Direct 3D 11 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.
Hinweis: Diese Funktion muss im Rendering-Thread des Szenegraphen aufgerufen werden.
Diese Funktion wurde in Qt 6.0 eingeführt.
Siehe auch QQuickWindow::sceneGraphInitialized(), QSGTexture, Scene Graph - Metal Texture Import, und Scene Graph - Vulkan Texture Import.
[pure virtual]
void *QSGD3D11Texture::nativeTexture() const
Gibt das ID3D11Texture2D-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.