QWGLContext Struct
struct QNativeInterface::QWGLContextWindows의 WGL 컨텍스트에 대한 네이티브 인터페이스. 더 보기...
Header: | #include <QOpenGLContext> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
이후: | Qt 6.0 |
- 상속된 멤버를 포함한 모든 멤버 목록
- QWGLContext는 네이티브 인터페이스의 일부입니다.
공용 함수
virtual HGLRC | nativeContext() const = 0 |
정적 공용 멤버
QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
HMODULE | openGLModuleHandle() |
상세 설명
QOpenGLContext::nativeInterface()를 통해 액세스합니다.
멤버 함수 문서
[static]
QOpenGLContext *QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr)
WGL context 핸들을 채택합니다.
window 은 픽셀 형식을 쿼리하기 때문에 필요합니다. 채택이 성공하면 QOpenGLContext::format()는 이 픽셀 형식을 설명하는 QSurfaceFormat 을 반환합니다.
참고: window 에 지정된 창은 해당 픽셀 형식이 컨텍스트와 호환되는 형식으로 설정되어 있어야 합니다. 창에 속한 디바이스 컨텍스트에서 SetPixelFormat() 호출이 이루어지지 않으면 컨텍스트 채택에 실패합니다.
생성된 QOpenGLContext shareContext 의 소유권은 호출자에게 이전됩니다.
[pure virtual]
HGLRC QWGLContext::nativeContext() const
기본 컨텍스트 핸들을 반환합니다.
[static]
HMODULE QWGLContext::openGLModuleHandle()
현재 사용 중인 OpenGL 구현의 핸들을 반환합니다.
참고: 이 함수를 사용하려면 QGuiApplication 인스턴스가 이미 생성되어 있어야 합니다.
© 2025 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.