]> git.localhorst.tv Git - blank.git/blob - src/init.hpp
remove unused (explicit) destructors
[blank.git] / src / init.hpp
1 #ifndef BLANK_INIT_HPP_
2 #define BLANK_INIT_HPP_
3
4 #include <SDL.h>
5
6
7 namespace blank {
8
9 class GLContext;
10
11
12 class InitSDL {
13
14 public:
15         InitSDL();
16         ~InitSDL();
17
18         InitSDL(const InitSDL &) = delete;
19         InitSDL &operator =(const InitSDL &) = delete;
20
21 };
22
23
24 class InitIMG {
25
26 public:
27         InitIMG();
28         ~InitIMG();
29
30         InitIMG(const InitIMG &) = delete;
31         InitIMG &operator =(const InitIMG &) = delete;
32
33 };
34
35
36 class InitGL {
37
38 public:
39         InitGL();
40
41         InitGL(const InitGL &) = delete;
42         InitGL &operator =(const InitGL &) = delete;
43
44 };
45
46
47 class Window {
48
49 public:
50         Window();
51         ~Window();
52
53         Window(const Window &) = delete;
54         Window &operator =(const Window &) = delete;
55
56         void GrabInput();
57         void ReleaseInput();
58
59         void GrabMouse();
60         void ReleaseMouse();
61
62         GLContext CreateContext();
63
64         void Flip();
65
66 private:
67         SDL_Window *handle;
68
69 };
70
71
72 class GLContext {
73
74 public:
75         explicit GLContext(SDL_Window *);
76         ~GLContext();
77
78         GLContext(GLContext &&);
79         GLContext &operator =(GLContext &&);
80
81         GLContext(const GLContext &) = delete;
82         GLContext &operator =(const GLContext &) = delete;
83
84         static void EnableVSync();
85         static void EnableDepthTest();
86         static void EnableBackfaceCulling();
87
88         static void Clear();
89
90 private:
91         SDL_GLContext handle;
92
93 };
94
95
96 class InitGLEW {
97
98 public:
99         InitGLEW();
100
101         InitGLEW(const InitGLEW &) = delete;
102         InitGLEW &operator =(const InitGLEW &) = delete;
103
104 };
105
106 }
107
108 #endif