Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
monitor.h
1#ifndef OE_CORE_MONITOR_H
2#define OE_CORE_MONITOR_H
3
4#include "../common.h"
5#include <string>
6#include <glm/vec2.hpp>
7#include <glm/vec3.hpp>
8
9namespace oe::core
10{
14 struct VideoMode
15 {
19 glm::ivec2 dimensions;
20
24 glm::ivec3 color_bits;
25
29 int32_t refresh_rate;
30 };
31
32 class Window;
33
37 class Monitor
38 {
39 public:
43 static const Monitor getDefaultMonitor();
44
50 const std::string getName() const;
51
56
57 private:
58 Monitor() = default;
59
60 Monitor(const Monitor&) = delete;
61 Monitor& operator=(const Monitor&) = delete;
62
63 Monitor(Monitor&&) = default;
64 Monitor& operator= (Monitor&&) = default;
65
66 void* _handle;
67
68 friend Window;
69 };
70}
71
72#endif
A Monitor connected to a GPU.
Definition monitor.h:38
const std::string getName() const
Get the Human readable monitor name.
static const Monitor getDefaultMonitor()
Get main primary monitor (ie. where OS UI elements are located)
const VideoMode getCurrentVideoMode() const
Get the current VideoMode of the monitor.
Definition window.h:24
Core functionality (windows, event handler, logger, ...)
Definition cursor.h:8
Video mode of a Monitor.
Definition monitor.h:15
int32_t refresh_rate
Refresh rate, in Hz.
Definition monitor.h:29
glm::ivec3 color_bits
Bit depth for each color.
Definition monitor.h:24
glm::ivec2 dimensions
Dimensions of the screen (in pixels)
Definition monitor.h:19