Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QOpenGLStaticContext Class Reference

Static Open GL context containing version information, extension function pointers, etc. More...

#include <qwindowsglcontext.h>

Inheritance diagram for QOpenGLStaticContext:
Collaboration diagram for QOpenGLStaticContext:

Public Types

enum  Extensions { SampleBuffers = 0x1 , sRGBCapableFramebuffer = 0x2 , Robustness = 0x4 }
typedef bool(APIENTRYWglGetPixelFormatAttribIVARB) (HDC hdc, int iPixelFormat, int iLayerPlane, uint nAttributes, const int *piAttributes, int *piValues)
typedef bool(APIENTRYWglChoosePixelFormatARB) (HDC hdc, const int *piAttribList, const float *pfAttribFList, uint nMaxFormats, int *piFormats, UINT *nNumFormats)
typedef HGLRC(APIENTRYWglCreateContextAttribsARB) (HDC, HGLRC, const int *)
typedef BOOL(APIENTRYWglSwapInternalExt) (int interval)
typedef int(APIENTRYWglGetSwapInternalExt) (void)
typedef const char *(APIENTRYWglGetExtensionsStringARB) (HDC)

Public Member Functions

bool hasExtensions () const
QWindowsOpenGLContextcreateContext (QOpenGLContext *context) override
QWindowsOpenGLContextcreateContext (HGLRC context, HWND window) override
voidmoduleHandle () const override
QOpenGLContext::OpenGLModuleType moduleType () const override
bool supportsThreadedOpenGL () const override
Public Member Functions inherited from QWindowsStaticOpenGLContext
virtual ~QWindowsStaticOpenGLContext ()=default
virtual voidcreateWindowSurface (void *, void *, int *)
virtual void destroyWindowSurface (void *)

Static Public Member Functions

static QOpenGLStaticContextcreate (bool softwareRendering=false)
static QByteArray getGlString (unsigned int which)
Static Public Member Functions inherited from QWindowsStaticOpenGLContext
static QWindowsStaticOpenGLContextcreate ()

Public Attributes

const QByteArray vendor
const QByteArray renderer
const QByteArray extensionNames
unsigned extensions
const QWindowsOpenGLContextFormat defaultFormat
WglGetPixelFormatAttribIVARB wglGetPixelFormatAttribIVARB
WglChoosePixelFormatARB wglChoosePixelFormatARB
WglCreateContextAttribsARB wglCreateContextAttribsARB
WglSwapInternalExt wglSwapInternalExt
WglGetSwapInternalExt wglGetSwapInternalExt
WglGetExtensionsStringARB wglGetExtensionsStringARB

Static Public Attributes

static QWindowsOpengl32DLL opengl32

Additional Inherited Members

Protected Member Functions inherited from QWindowsStaticOpenGLContext
 QWindowsStaticOpenGLContext ()=default

Detailed Description

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.

Note
Initialization requires an active context (see create()).
See also
QWindowsGLContext

Definition at line 101 of file qwindowsglcontext.h.

Member Typedef Documentation

◆ WglChoosePixelFormatARB

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.

◆ WglCreateContextAttribsARB

typedef HGLRC(APIENTRY * QOpenGLStaticContext::WglCreateContextAttribsARB) (HDC, HGLRC, const int *)

Definition at line 123 of file qwindowsglcontext.h.

◆ WglGetExtensionsStringARB

typedef const char *(APIENTRY * QOpenGLStaticContext::WglGetExtensionsStringARB) (HDC)

Definition at line 131 of file qwindowsglcontext.h.

◆ WglGetPixelFormatAttribIVARB

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.

◆ WglGetSwapInternalExt

typedef int(APIENTRY * QOpenGLStaticContext::WglGetSwapInternalExt) (void)

Definition at line 128 of file qwindowsglcontext.h.

◆ WglSwapInternalExt

typedef BOOL(APIENTRY * QOpenGLStaticContext::WglSwapInternalExt) (int interval)

Definition at line 126 of file qwindowsglcontext.h.

Member Enumeration Documentation

◆ Extensions

Enumerator
SampleBuffers 
sRGBCapableFramebuffer 
Robustness 

Definition at line 106 of file qwindowsglcontext.h.

Member Function Documentation

◆ create()

QOpenGLStaticContext * QOpenGLStaticContext::create ( bool softwareRendering = false)
static

Definition at line 998 of file qwindowsglcontext.cpp.

References QWindowsOpengl32DLL::init(), and opengl32.

Here is the call graph for this function:

◆ createContext() [1/2]

QWindowsOpenGLContext * QOpenGLStaticContext::createContext ( HGLRC context,
HWND window )
overridevirtual

Implements QWindowsStaticOpenGLContext.

Definition at line 198 of file qwindowsglcontext.cpp.

◆ createContext() [2/2]

QWindowsOpenGLContext * QOpenGLStaticContext::createContext ( QOpenGLContext * context)
overridevirtual

Implements QWindowsStaticOpenGLContext.

Definition at line 193 of file qwindowsglcontext.cpp.

◆ getGlString()

QByteArray QOpenGLStaticContext::getGlString ( unsigned int which)
static

Definition at line 991 of file qwindowsglcontext.cpp.

References opengl32.

◆ hasExtensions()

bool QOpenGLStaticContext::hasExtensions ( ) const
inline

Definition at line 134 of file qwindowsglcontext.h.

Referenced by ARB::choosePixelFormat(), ARB::createContext(), operator<<(), and ARB::qSurfaceFormatFromHDC().

Here is the caller graph for this function:

◆ moduleHandle()

void * QOpenGLStaticContext::moduleHandle ( ) const
inlineoverridevirtual

Implements QWindowsStaticOpenGLContext.

Definition at line 142 of file qwindowsglcontext.h.

References QWindowsOpengl32DLL::moduleHandle(), and opengl32.

Here is the call graph for this function:

◆ moduleType()

QOpenGLContext::OpenGLModuleType QOpenGLStaticContext::moduleType ( ) const
inlineoverridevirtual

Implements QWindowsStaticOpenGLContext.

Definition at line 143 of file qwindowsglcontext.h.

◆ supportsThreadedOpenGL()

bool QOpenGLStaticContext::supportsThreadedOpenGL ( ) const
inlineoverridevirtual

Reimplemented from QWindowsStaticOpenGLContext.

Definition at line 148 of file qwindowsglcontext.h.

References QWindowsOpengl32DLL::moduleIsNotOpengl32(), and opengl32.

Here is the call graph for this function:

Member Data Documentation

◆ defaultFormat

const QWindowsOpenGLContextFormat QOpenGLStaticContext::defaultFormat

Definition at line 155 of file qwindowsglcontext.h.

◆ extensionNames

const QByteArray QOpenGLStaticContext::extensionNames

Definition at line 153 of file qwindowsglcontext.h.

◆ extensions

unsigned QOpenGLStaticContext::extensions

◆ opengl32

◆ renderer

const QByteArray QOpenGLStaticContext::renderer

Definition at line 152 of file qwindowsglcontext.h.

◆ vendor

const QByteArray QOpenGLStaticContext::vendor

Definition at line 151 of file qwindowsglcontext.h.

◆ wglChoosePixelFormatARB

WglChoosePixelFormatARB QOpenGLStaticContext::wglChoosePixelFormatARB

Definition at line 158 of file qwindowsglcontext.h.

◆ wglCreateContextAttribsARB

WglCreateContextAttribsARB QOpenGLStaticContext::wglCreateContextAttribsARB

Definition at line 159 of file qwindowsglcontext.h.

◆ wglGetExtensionsStringARB

WglGetExtensionsStringARB QOpenGLStaticContext::wglGetExtensionsStringARB

Definition at line 162 of file qwindowsglcontext.h.

◆ wglGetPixelFormatAttribIVARB

WglGetPixelFormatAttribIVARB QOpenGLStaticContext::wglGetPixelFormatAttribIVARB

Definition at line 157 of file qwindowsglcontext.h.

◆ wglGetSwapInternalExt

WglGetSwapInternalExt QOpenGLStaticContext::wglGetSwapInternalExt

Definition at line 161 of file qwindowsglcontext.h.

◆ wglSwapInternalExt

WglSwapInternalExt QOpenGLStaticContext::wglSwapInternalExt

Definition at line 160 of file qwindowsglcontext.h.


The documentation for this class was generated from the following files: