![]() |
Qt 6.x
The Qt SDK
|
Static Open GL context containing version information, extension function pointers, etc. More...
#include <qwindowsglcontext.h>
Public Types | |
enum | Extensions { SampleBuffers = 0x1 , sRGBCapableFramebuffer = 0x2 , Robustness = 0x4 } |
typedef bool(APIENTRY * | WglGetPixelFormatAttribIVARB) (HDC hdc, int iPixelFormat, int iLayerPlane, uint nAttributes, const int *piAttributes, int *piValues) |
typedef bool(APIENTRY * | WglChoosePixelFormatARB) (HDC hdc, const int *piAttribList, const float *pfAttribFList, uint nMaxFormats, int *piFormats, UINT *nNumFormats) |
typedef HGLRC(APIENTRY * | WglCreateContextAttribsARB) (HDC, HGLRC, const int *) |
typedef BOOL(APIENTRY * | WglSwapInternalExt) (int interval) |
typedef int(APIENTRY * | WglGetSwapInternalExt) (void) |
typedef const char *(APIENTRY * | WglGetExtensionsStringARB) (HDC) |
Public Member Functions | |
bool | hasExtensions () const |
QWindowsOpenGLContext * | createContext (QOpenGLContext *context) override |
QWindowsOpenGLContext * | createContext (HGLRC context, HWND window) override |
void * | moduleHandle () const override |
QOpenGLContext::OpenGLModuleType | moduleType () const override |
bool | supportsThreadedOpenGL () const override |
![]() | |
virtual | ~QWindowsStaticOpenGLContext ()=default |
virtual QWindowsOpenGLContext * | createContext (QOpenGLContext *context)=0 |
virtual QWindowsOpenGLContext * | createContext (HGLRC context, HWND window)=0 |
virtual void * | moduleHandle () const =0 |
virtual QOpenGLContext::OpenGLModuleType | moduleType () const =0 |
virtual bool | supportsThreadedOpenGL () const |
virtual void * | createWindowSurface (void *, void *, int *) |
virtual void | destroyWindowSurface (void *) |
Static Public Member Functions | |
static QOpenGLStaticContext * | create (bool softwareRendering=false) |
static QByteArray | getGlString (unsigned int which) |
![]() | |
static QWindowsStaticOpenGLContext * | create () |
Static Public Attributes | |
static QWindowsOpengl32DLL | opengl32 |
Additional Inherited Members | |
![]() | |
QWindowsStaticOpenGLContext ()=default | |
Static Open GL context containing version information, extension function pointers, etc.
Functions pending integration in the next version of OpenGL are post-fixed ARB.
No WGL or OpenGL functions are called directly from the windows plugin. Instead, the static context loads opengl32.dll and resolves the necessary functions. This allows building the plugin without linking to opengl32 and enables QT_OPENGL_DYNAMIC builds where both the EGL and WGL (this) based implementation of the context are built.
Definition at line 101 of file qwindowsglcontext.h.
typedef bool(APIENTRY * QOpenGLStaticContext::WglChoosePixelFormatARB) (HDC hdc, const int *piAttribList, const float *pfAttribFList, uint nMaxFormats, int *piFormats, UINT *nNumFormats) |
Definition at line 118 of file qwindowsglcontext.h.
typedef HGLRC(APIENTRY * QOpenGLStaticContext::WglCreateContextAttribsARB) (HDC, HGLRC, const int *) |
Definition at line 123 of file qwindowsglcontext.h.
typedef const char *(APIENTRY * QOpenGLStaticContext::WglGetExtensionsStringARB) (HDC) |
Definition at line 131 of file qwindowsglcontext.h.
typedef bool(APIENTRY * QOpenGLStaticContext::WglGetPixelFormatAttribIVARB) (HDC hdc, int iPixelFormat, int iLayerPlane, uint nAttributes, const int *piAttributes, int *piValues) |
Definition at line 113 of file qwindowsglcontext.h.
Definition at line 128 of file qwindowsglcontext.h.
typedef BOOL(APIENTRY * QOpenGLStaticContext::WglSwapInternalExt) (int interval) |
Definition at line 126 of file qwindowsglcontext.h.
Enumerator | |
---|---|
SampleBuffers | |
sRGBCapableFramebuffer | |
Robustness |
Definition at line 106 of file qwindowsglcontext.h.
|
static |
Definition at line 998 of file qwindowsglcontext.cpp.
References QWindowsOpengl32DLL::init(), opengl32, qCDebug, qWarning, and QScopedPointer< T, Cleanup >::reset().
|
overridevirtual |
Implements QWindowsStaticOpenGLContext.
Definition at line 198 of file qwindowsglcontext.cpp.
References context, and window().
|
overridevirtual |
Implements QWindowsStaticOpenGLContext.
Definition at line 193 of file qwindowsglcontext.cpp.
References context.
|
static |
Definition at line 991 of file qwindowsglcontext.cpp.
References QWindowsOpengl32DLL::glGetString(), and opengl32.
Referenced by QWindowsOpenGLContextFormat::current().
|
inline |
Definition at line 134 of file qwindowsglcontext.h.
References wglChoosePixelFormatARB, wglCreateContextAttribsARB, and wglGetPixelFormatAttribIVARB.
Referenced by QWindowsGLContext::QWindowsGLContext(), ARB::choosePixelFormat(), ARB::createContext(), and ARB::qSurfaceFormatFromHDC().
|
inlineoverridevirtual |
Implements QWindowsStaticOpenGLContext.
Definition at line 142 of file qwindowsglcontext.h.
References QWindowsOpengl32DLL::moduleHandle(), and opengl32.
|
inlineoverridevirtual |
Implements QWindowsStaticOpenGLContext.
Definition at line 143 of file qwindowsglcontext.h.
References QOpenGLContext::LibGL.
|
inlineoverridevirtual |
Reimplemented from QWindowsStaticOpenGLContext.
Definition at line 148 of file qwindowsglcontext.h.
References QWindowsOpengl32DLL::moduleIsNotOpengl32(), and opengl32.
const QWindowsOpenGLContextFormat QOpenGLStaticContext::defaultFormat |
Definition at line 155 of file qwindowsglcontext.h.
Referenced by QWindowsGLContext::QWindowsGLContext(), and ARB::createContext().
const QByteArray QOpenGLStaticContext::extensionNames |
Definition at line 153 of file qwindowsglcontext.h.
unsigned QOpenGLStaticContext::extensions |
Definition at line 154 of file qwindowsglcontext.h.
Referenced by QWindowsGLContext::QWindowsGLContext(), ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().
|
static |
Definition at line 164 of file qwindowsglcontext.h.
Referenced by QOpenGLTemporaryContext::QOpenGLTemporaryContext(), QWindowsGLContext::QWindowsGLContext(), QOpenGLTemporaryContext::~QOpenGLTemporaryContext(), QWindowsGLContext::~QWindowsGLContext(), ARB::choosePixelFormat(), GDI::choosePixelFormat(), create(), ARB::createContext(), GDI::createContext(), createDummyGLContext(), QWindowsOpenGLContextFormat::current(), currentOpenGLContextData(), describeFormats(), QWindowsGLContext::doneCurrent(), getGlString(), QWindowsGLContext::getProcAddress(), isSoftwareGl(), QWindowsGLContext::makeCurrent(), moduleHandle(), supportsThreadedOpenGL(), and QWindowsGLContext::swapBuffers().
const QByteArray QOpenGLStaticContext::renderer |
Definition at line 152 of file qwindowsglcontext.h.
const QByteArray QOpenGLStaticContext::vendor |
Definition at line 151 of file qwindowsglcontext.h.
WglChoosePixelFormatARB QOpenGLStaticContext::wglChoosePixelFormatARB |
Definition at line 158 of file qwindowsglcontext.h.
Referenced by ARB::choosePixelFormat(), and hasExtensions().
WglCreateContextAttribsARB QOpenGLStaticContext::wglCreateContextAttribsARB |
Definition at line 159 of file qwindowsglcontext.h.
Referenced by ARB::createContext(), and hasExtensions().
WglGetExtensionsStringARB QOpenGLStaticContext::wglGetExtensionsStringARB |
Definition at line 162 of file qwindowsglcontext.h.
Referenced by QWindowsGLContext::QWindowsGLContext().
WglGetPixelFormatAttribIVARB QOpenGLStaticContext::wglGetPixelFormatAttribIVARB |
Definition at line 157 of file qwindowsglcontext.h.
Referenced by hasExtensions(), and ARB::qSurfaceFormatFromHDC().
WglGetSwapInternalExt QOpenGLStaticContext::wglGetSwapInternalExt |
Definition at line 161 of file qwindowsglcontext.h.
WglSwapInternalExt QOpenGLStaticContext::wglSwapInternalExt |
Definition at line 160 of file qwindowsglcontext.h.
Referenced by QWindowsGLContext::makeCurrent().