QNativeInterface::QWGLContext Struct
Interfaz nativa para un contexto WGL en Windows. Más...
| Encabezado: | #include <QOpenGLContext> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Desde: | Qt 6.0 |
- Lista de todos los miembros, incluidos los heredados
- QWGLContext forma parte de Interfaces nativas.
Funciones públicas
| QWGLContext() | |
| QWGLContext(const QNativeInterface::QWGLContext &) | |
| QWGLContext(QNativeInterface::QWGLContext &&) | |
| virtual HGLRC | nativeContext() const = 0 |
| QNativeInterface::QWGLContext & | operator=(QNativeInterface::QWGLContext &&) |
| QNativeInterface::QWGLContext & | operator=(const QNativeInterface::QWGLContext &) |
Miembros públicos estáticos
| QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
| HMODULE | openGLModuleHandle() |
Descripción detallada
Se accede a través de ` QOpenGLContext::nativeInterface()`.
Documentación de funciones de miembro
[constexpr noexcept default] QWGLContext::QWGLContext()
Crea por defecto una instancia de ` QWGLContext`.
[delete] QWGLContext::QWGLContext(const QNativeInterface::QWGLContext &)
Crea una instancia de ` QWGLContext` mediante copia. Esta función se ha eliminado.
[delete] QWGLContext::QWGLContext(QNativeInterface::QWGLContext &&)
Crea mediante «move» una instancia de ` QWGLContext`. Esta función se ha eliminado.
[static] QOpenGLContext *QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr)
Adopta un identificador WGL context.
El window es necesario porque se consultará su formato de píxeles. Cuando la adopción se realiza correctamente, QOpenGLContext::format() devolverá un QSurfaceFormat que describe este formato de píxeles.
Nota: La ventana especificada por window debe tener su formato de píxeles configurado en un formato compatible con el del contexto. Si no se ha realizado ninguna llamada a SetPixelFormat() en ningún contexto de dispositivo perteneciente a la ventana, la adopción del contexto fallará.
La propiedad del objeto QOpenGLContext creado shareContext se transfiere al autor de la llamada.
[pure virtual] HGLRC QWGLContext::nativeContext() const
Devuelve el identificador del contexto subyacente.
[static] HMODULE QWGLContext::openGLModuleHandle()
Devuelve el identificador de la implementación de OpenGL que se está utilizando actualmente.
Nota: Esta función requiere que la instancia de ` QGuiApplication ` ya esté creada.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(QNativeInterface::QWGLContext &&)
Asigna mediante «Move» other a esta instancia de QWGLContext. Esta función se elimina.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(const QNativeInterface::QWGLContext &)
Asigna por copia other a esta instancia de QWGLContext. Esta función se ha eliminado.
© 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.