5#include "structure/opengl/spk_view_region.hpp"
6#include "structure/win32/spk_window.hpp"
38 using HandleDeviceContext = HDC;
39 using HandleRenderingContext = HGLRC;
42 HandleDeviceContext _hdc;
43 HandleRenderingContext _hglrc;
45 void _setPixelFormatToDevice(HandleDeviceContext p_hdc);
Manages viewport and scissor rectangles and clearing.
Definition spk_view_region.hpp:26
void releaseCurrent()
Releases this context from the current thread.
Definition spk_wgl_context.cpp:173
void swap()
Swaps buffers.
Definition spk_wgl_context.cpp:193
WglContext(Win32::Window &p_window, Version p_version)
Creates an OpenGL context for a window with a desired version.
Definition spk_wgl_context.cpp:55
HandleRenderingContext renderingContext() const noexcept
Access to rendering context handle.
Definition spk_wgl_context.cpp:203
HandleDeviceContext deviceContext() const noexcept
Access to device context handle.
Definition spk_wgl_context.cpp:198
void makeCurrent()
Activates this context on the current thread.
Definition spk_wgl_context.cpp:165
void resize(const spk::Extend2D &p_extend2D)
Resizes viewport to match new client size.
Definition spk_wgl_context.cpp:187
void clear()
Clears using the current ViewRegion settings.
Definition spk_wgl_context.cpp:181
RAII wrapper over a Win32 HWND handle created by spk::Win32::Class.
Definition spk_window.hpp:20
Axis-aligned rectangle defined by an anchor point and size.
Definition spk_extend_2d.hpp:24
Desired OpenGL major/minor version numbers.
Definition spk_wgl_context.hpp:24
size_t major
Major version of the OpenGL context.
Definition spk_wgl_context.hpp:28
size_t minor
Minor version of the OpenGL context.
Definition spk_wgl_context.hpp:32