Auf dieser Seite

QNativeInterface::QSGD3D12Texture Struct

Bietet Zugriff auf Direct3D 12-Texturobjekte und ermöglicht deren Verwendung. Mehr...

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

Öffentliche Funktionen

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

Statische öffentliche Mitglieder

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

Ausführliche Beschreibung

Dokumentation der Mitgliedsfunktionen

[constexpr noexcept default] QSGD3D12Texture::QSGD3D12Texture()

Erstellt standardmäßig eine Instanz von ` QSGD3D12Texture`.

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

Erstellt eine Instanz von „ QSGD3D12Texture “ durch Kopieren. Diese Funktion wurde gelöscht.

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

Erstellt eine Instanz von „ QSGD3D12Texture “. Diese Funktion ist gelöscht.

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

Erstellt ein neues „ QSGTexture “-Objekt, das ein vorhandenes Direct 3D 12- texture -Objekt für „ window “ umhüllt.

Das native Objekt wird von dem resultierenden „ QSGTexture “ umschlossen, befindet sich jedoch nicht in dessen Besitz. Der Aufrufer der Funktion ist für das Löschen des zurückgegebenen „ QSGTexture “ verantwortlich, wodurch das zugrunde liegende native Objekt jedoch nicht zerstört wird.

Diese Funktion eignet sich derzeit nur für 2D-RGBA-Texturen.

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

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

size gibt die Größe in Pixeln an.

resourceState muss den aktuellen Zustand der Texturressource angeben.

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

Diese Funktion wurde in Qt 6.6 eingeführt.

Siehe auch ` QQuickWindow::sceneGraphInitialized()`, ` QSGTexture`, „Szenengraph – Metal-Texturimport“ und „Szenengraph – Vulkan-Texturimport“.

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

Gibt das ID3D12Texture-Objekt zurück.

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

Weist „ other “ dieser „ QSGD3D12Texture “-Instanz zu. Diese Funktion wird gelöscht.

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

other Weist dieser Instanz von „ QSGD3D12Texture “ die Werte von „ “ zu. Diese Funktion wird gelöscht.

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