Manages a Windows WGL OpenGL context tied to a window.
More...
#include <spk_wgl_context.hpp>
|
| | WglContext (Win32::Window &p_window, Version p_version) |
| | Creates an OpenGL context for a window with a desired version.
|
|
| WglContext (const WglContext &)=delete |
|
WglContext & | operator= (const WglContext &)=delete |
|
| WglContext (WglContext &&)=delete |
|
WglContext & | operator= (WglContext &&)=delete |
|
void | makeCurrent () |
| | Activates this context on the current thread.
|
|
void | releaseCurrent () |
| | Releases this context from the current thread.
|
|
void | clear () |
| | Clears using the current ViewRegion settings.
|
| void | resize (const spk::Extend2D &p_extend2D) |
| | Resizes viewport to match new client size.
|
|
void | swap () |
| | Swaps buffers.
|
| HandleDeviceContext | deviceContext () const noexcept |
| | Access to device context handle.
|
| HandleRenderingContext | renderingContext () const noexcept |
| | Access to rendering context handle.
|
Manages a Windows WGL OpenGL context tied to a window.
◆ WglContext()
Creates an OpenGL context for a window with a desired version.
- Parameters
-
| p_window | Target window. |
| p_version | OpenGL version. |
◆ deviceContext()
| WglContext::HandleDeviceContext spk::OpenGL::WglContext::deviceContext |
( |
| ) |
const |
|
noexcept |
Access to device context handle.
- Returns
- HDC.
◆ renderingContext()
| WglContext::HandleRenderingContext spk::OpenGL::WglContext::renderingContext |
( |
| ) |
const |
|
noexcept |
Access to rendering context handle.
- Returns
- HGLRC.
◆ resize()
| void spk::OpenGL::WglContext::resize |
( |
const spk::Extend2D & | p_extend2D | ) |
|
Resizes viewport to match new client size.
- Parameters
-
| p_extend2D | New dimensions. |
The documentation for this class was generated from the following files: