QNativeInterface::QWGLContext Struct
Interfaccia nativa per un contesto WGL su Windows. Per saperne di più...
| Intestazione: | #include <QOpenGLContext> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| A partire da: | Qt 6.0 |
- Elenco di tutti i membri, compresi quelli ereditati
- QWGLContext fa parte di Interfacce native.
Funzioni pubbliche
| QWGLContext() | |
| QWGLContext(const QNativeInterface::QWGLContext &) | |
| QWGLContext(QNativeInterface::QWGLContext &&) | |
| virtual HGLRC | nativeContext() const = 0 |
| QNativeInterface::QWGLContext & | operator=(QNativeInterface::QWGLContext &&) |
| QNativeInterface::QWGLContext & | operator=(const QNativeInterface::QWGLContext &) |
Membri pubblici statici
| QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
| HMODULE | openGLModuleHandle() |
Descrizione dettagliata
Accessibile tramite QOpenGLContext::nativeInterface().
Documentazione delle funzioni membro
[constexpr noexcept default] QWGLContext::QWGLContext()
Crea automaticamente un'istanza di ` QWGLContext`.
[delete] QWGLContext::QWGLContext(const QNativeInterface::QWGLContext &)
Crea una copia di un'istanza di ` QWGLContext`. Questa funzione è stata eliminata.
[delete] QWGLContext::QWGLContext(QNativeInterface::QWGLContext &&)
Crea un'istanza di ` QWGLContext`. Questa funzione è stata eliminata.
[static] QOpenGLContext *QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr)
Adotta un handle WGL context.
L'window è necessario perché verrà interrogato il suo formato pixel. Se l'adozione va a buon fine, la funzione QOpenGLContext::format() restituirà un oggetto QSurfaceFormat che descrive tale formato pixel.
Nota: la finestra specificata da window deve avere il formato pixel impostato su un formato compatibile con quello del contesto. Se non è stata effettuata alcuna chiamata a SetPixelFormat() su alcun contesto di dispositivo appartenente alla finestra, l'adozione del contesto fallirà.
La proprietà dell’ QOpenGLContext creato shareContext viene trasferita al chiamante.
[pure virtual] HGLRC QWGLContext::nativeContext() const
Restituisce l'handle del contesto sottostante.
[static] HMODULE QWGLContext::openGLModuleHandle()
Restituisce l'handle dell'implementazione OpenGL attualmente in uso.
Nota: questa funzione richiede che l'istanza di ` QGuiApplication ` sia già stata creata.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(QNativeInterface::QWGLContext &&)
Assegna " other " a questa istanza di " QWGLContext ". Questa funzione viene eliminata.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(const QNativeInterface::QWGLContext &)
Copia e assegna other a questa istanza QWGLContext. 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.