QNativeInterface::QWGLContext Struct
Windows에서 WGL 컨텍스트에 대한 네이티브 인터페이스. 더 보기...
| 헤더: | #include <QOpenGLContext> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 다음 버전부터: | Qt 6.0부터 |
- 상속된 멤버를 포함한 모든 멤버 목록
- QWGLContext는 네이티브 인터페이스의 일부입니다.
공개 함수
| QWGLContext() | |
| QWGLContext(const QNativeInterface::QWGLContext &) | |
| QWGLContext(QNativeInterface::QWGLContext &&) | |
| virtual HGLRC | nativeContext() const = 0 |
| QNativeInterface::QWGLContext & | operator=(QNativeInterface::QWGLContext &&) |
| QNativeInterface::QWGLContext & | operator=(const QNativeInterface::QWGLContext &) |
정적 공용 멤버
| QOpenGLContext * | fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr) |
| HMODULE | openGLModuleHandle() |
상세 설명
QOpenGLContext::nativeInterface()를 통해 액세스합니다.
멤버 함수 설명
[constexpr noexcept default] QWGLContext::QWGLContext()
QWGLContext 의 인스턴스를 기본 생성합니다.
[delete] QWGLContext::QWGLContext(const QNativeInterface::QWGLContext &)
QWGLContext 의 인스턴스를 복사 생성합니다. 이 함수는 삭제되었습니다.
[delete] QWGLContext::QWGLContext(QNativeInterface::QWGLContext &&)
QWGLContext 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.
[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 인스턴스가 이미 생성되어 있어야 합니다.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(QNativeInterface::QWGLContext &&)
other 를 이 QWGLContext 인스턴스에 이동 할당합니다. 이 함수는 삭제됩니다.
[delete] QNativeInterface::QWGLContext &QWGLContext::operator=(const QNativeInterface::QWGLContext &)
other 를 이 QWGLContext 인스턴스에 복사-할당합니다. 이 함수는 삭제되었습니다.
© 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.