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 <string>
5#include <glm/vec2.hpp>
6#include <glm/vec3.hpp>
7
8namespace oe::core
9{
13 struct VideoMode
14 {
18 glm::ivec2 dimensions;
19
23 glm::ivec3 color_bits;
24
28 int32_t refresh_rate;
29 };
30
31 class Window;
32
36 class Monitor
37 {
38 public:
42 static const Monitor getDefaultMonitor();
43
49 const std::string getName() const;
50
55
56 private:
57 Monitor() = default;
58
59 Monitor(const Monitor&) = delete;
60 Monitor& operator=(const Monitor&) = delete;
61
62 Monitor(Monitor&&) = default;
63 Monitor& operator= (Monitor&&) = default;
64
65 void* _handle = nullptr;
66
67 friend Window;
68 };
69}
70
71#endif
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 args.h:10
Video mode of a Monitor.
Definition monitor.h:14
int32_t refresh_rate
Refresh rate, in Hz.
Definition monitor.h:28
glm::ivec3 color_bits
Bit depth for each color.
Definition monitor.h:23
glm::ivec2 dimensions
Dimensions of the screen (in pixels).
Definition monitor.h:18