QWGLContext Struct
struct QNativeInterface::QWGLContextWindows上のWGLコンテキストのネイティブ・インターフェース。さらに...
ヘッダー | #include <QOpenGLContext> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
以来: | Qt 6.0 |
- 継承メンバを含む全メンバの一覧
- QWGLContext はNative Interfaces の一部です。
パブリック関数
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)
WGLcontext ハンドルを採用する。
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.