QNativeInterface::QWGLContext Struct
Native Schnittstelle zu einem WGL-Kontext unter Windows. Mehr...
| Header: | #include <QOpenGLContext> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Seit: | Qt 6.0 |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QWGLContext ist Teil von „Native Interfaces“.
Öffentliche Funktionen
| QWGLContext() | |
| QWGLContext(const QNativeInterface::QWGLContext &) | |
| QWGLContext(QNativeInterface::QWGLContext &&) | |
| virtual HGLRC | nativeContext() const = 0 |
| QNativeInterface::QWGLContext & | operator=(QNativeInterface::QWGLContext &&) |
| QNativeInterface::QWGLContext & | operator=(const QNativeInterface::QWGLContext &) |
Statische öffentliche Mitglieder
| QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
| HMODULE | openGLModuleHandle() |
Ausführliche Beschreibung
Zugriff über „ QOpenGLContext::nativeInterface()“.
Dokumentation der Mitgliedsfunktionen
[constexpr noexcept default] QWGLContext::QWGLContext()
Erstellt standardmäßig eine Instanz von ` QWGLContext`.
[delete] QWGLContext::QWGLContext(const QNativeInterface::QWGLContext &)
Erstellt eine Instanz von „ QWGLContext “ durch Kopieren. Diese Funktion wurde gelöscht.
[delete] QWGLContext::QWGLContext(QNativeInterface::QWGLContext &&)
Erstellt eine Instanz von ` QWGLContext`. Diese Funktion ist gelöscht.
[static] QOpenGLContext *QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr)
Übernimmt ein WGL- context -Handle.
Die „ window “ wird benötigt, da deren Pixelformat abgefragt wird. Bei erfolgreicher Übernahme gibt „ QOpenGLContext::format()“ eine „ QSurfaceFormat “ zurück, die dieses Pixelformat beschreibt.
Hinweis: Das durch ` window ` angegebene Fenster muss ein Pixelformat haben, das mit dem des Kontexts kompatibel ist. Wenn für keinen der zum Fenster gehörenden Gerätekontexte ein Aufruf von `SetPixelFormat()` erfolgt ist, schlägt die Übernahme des Kontexts fehl.
Das Eigentumsrecht an dem erstellten QOpenGLContext shareContext wird auf den Aufrufer übertragen.
[pure virtual] HGLRC QWGLContext::nativeContext() const
Gibt das zugrunde liegende Kontext-Handle zurück.
[static] HMODULE QWGLContext::openGLModuleHandle()
Gibt das Handle für die derzeit verwendete OpenGL-Implementierung zurück.
Hinweis: Fürdiese Funktion muss die Instanz „ QGuiApplication “ bereits erstellt worden sein.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(QNativeInterface::QWGLContext &&)
Weist „ other “ dieser „ QWGLContext “-Instanz zu. Diese Funktion wird gelöscht.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(const QNativeInterface::QWGLContext &)
other Weist dieser „ QWGLContext “-Instanz „ “ per Kopierzuweisung 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.