QNativeInterface::QWGLContext Struct
Interface nativa para um contexto WGL no Windows. Mais...
| Cabeçalho: | #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 os membros, incluindo os herdados
- QWGLContext faz parte das Interfaces Nativas.
Funções 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 &) |
Membros públicos estáticos
| QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
| HMODULE | openGLModuleHandle() |
Descrição detalhada
Acessado por meio de ` QOpenGLContext::nativeInterface()`.
Documentação da função de membro
[constexpr noexcept default] QWGLContext::QWGLContext()
Constrói, por padrão, uma instância de ` QWGLContext`.
[delete] QWGLContext::QWGLContext(const QNativeInterface::QWGLContext &)
Cria uma instância de ` QWGLContext` por meio de cópia. Essa função foi excluída.
[delete] QWGLContext::QWGLContext(QNativeInterface::QWGLContext &&)
Cria uma instância de ` QWGLContext` por meio da função `move`. Essa função foi excluída.
[static] QOpenGLContext *QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr)
Adota um identificador de WGL context.
O ` window ` é necessário porque seu formato de pixel será consultado. Quando a adoção for bem-sucedida, a função ` QOpenGLContext::format()` retornará um ` QSurfaceFormat ` que descreve esse formato de pixel.
Observação: A janela especificada por ` window ` deve ter seu formato de pixel definido como um formato compatível com o do contexto. Se nenhuma chamada a `SetPixelFormat()` tiver sido feita em qualquer contexto de dispositivo pertencente à janela, a adoção do contexto falhará.
A propriedade do QOpenGLContext criado shareContext é transferida para o chamador.
[pure virtual] HGLRC QWGLContext::nativeContext() const
Retorna o identificador do contexto subjacente.
[static] HMODULE QWGLContext::openGLModuleHandle()
Retorna o identificador da implementação do OpenGL que está em uso no momento.
Observação: Esta função requer que a instância do ` QGuiApplication ` já esteja criada.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(QNativeInterface::QWGLContext &&)
A função “Move-assigns” atribui other a esta instância QWGLContext. Essa função foi excluída.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(const QNativeInterface::QWGLContext &)
Copia e atribui other a esta instância de QWGLContext. Esta função foi excluída.
© 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.