Common: Add GL context wrapper implementation

This commit is contained in:
Connor McLaughlin
2020-05-07 22:48:13 +10:00
parent 75ad533f30
commit 4f4c4f4146
22 changed files with 2012 additions and 7 deletions

31
src/common/window_info.h Normal file
View File

@ -0,0 +1,31 @@
#pragma once
// Contains the information required to create a graphics context in a window.
struct WindowInfo
{
enum class Type
{
Surfaceless,
Win32,
X11,
Wayland,
MacOS,
Android
};
enum class SurfaceFormat
{
None,
RGB8,
RGBA8,
RGB565,
Count
};
Type type = Type::Surfaceless;
void* display_connection = nullptr;
void* window_handle = nullptr;
u32 surface_width = 0;
u32 surface_height = 0;
SurfaceFormat surface_format = SurfaceFormat::RGB8;
};