Class that represents the WGL context. More...
#include <kanzi/core.ui/platform/context_api/wgl/wgl_context.hpp>
Public Member Functions | |
KZ_NO_DISCARD HGLRC | getNativeHandle () const noexcept |
Gets the WGL render context handle. | |
bool | makeCurrent (const Win32DeviceContext &deviceContext) noexcept |
Activates WGL context for the current thread. | |
bool | makeCurrent (HDC deviceContextHandle) noexcept |
Activates the WGL context for the current thread. | |
bool | releaseCurrent () noexcept |
Deactivates the WGL context for the current thread. | |
WGLContext (HDC deviceContextHandle) | |
Constructor. | |
WGLContext (HGLRC renderContext) | |
Constructor. | |
WGLContext (Win32DeviceContext &deviceContext, HGLRC sharedContext, span< int > attribs) | |
Constructor. | |
WGLContext (Win32DeviceContext &deviceContext, int formatID) | |
Constructor. | |
Static Public Member Functions | |
static PROC | getProcAddress (const char *functionName) noexcept |
Gets the pointer to a GL function. | |
Class that represents the WGL context.
|
explicit |
Constructor.
deviceContext | The device context for which to create the WGL context. |
formatID | The graphics format ID with which to select the pixel format. To select the default pixel format, use 0. |
|
explicit |
Constructor.
deviceContextHandle | The native device context for which to create the WGL context. |
|
explicit |
Constructor.
renderContext | WGL render context handle. |
|
explicit |
Constructor.
deviceContext | The device context for which to create the WGL context. |
sharedContext | WGL render context handle to share data with. |
attribs | List of WGL attributes used for the WGL context. The list must be terminated with 0. |
Gets the pointer to a GL function.
functionName | Name of the GL function for which to get the pointer. |
|
noexcept |
Activates WGL context for the current thread.
deviceContext | The device context for which to activate the current thread. |
Activates the WGL context for the current thread.
deviceContextHandle | The native device context for which to activate the current thread. |
|
noexcept |
Deactivates the WGL context for the current thread.
|
noexcept |
Gets the WGL render context handle.