-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.h
More file actions
49 lines (45 loc) · 1.45 KB
/
Copy pathWindow.h
File metadata and controls
49 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef WINDOW_H
#define WINDOW_H
//#include <GLES3/gl3.h>
//#include <GLFW/glfw3.h>
//#include <GL/gl.h>
//#include <GL/glew.h>
//#include <GL/glcorearb.h>
#include <SDL2/SDL.h>
#include <string>
#include <common/types.h>
/**
* @file Window.h
* @brief Header for the window object (visible window to users)
*/
namespace CGameEngine
{
/**
* Enum to hold the window flags (invis/hidden, borderless, or fullscreen)
*/
enum WindowFlags
{
INVISIBLE = 0x1, /**< Window is minimized or hidden behind other applications */
FULLSCREEN = 0x2, /**< Fullscreen in whatever OS context */
BORDERLESS = 0x4 /**< Used primarily with Fullscreen Windowed */
};
/**
* Class responsible for the 'active' Window presented to users
*/
class Window
{
public:
Window();
~Window();
int create(std::string windowName, int scrWidth, int scrHeight, unsigned int currentFlags);
const int& getScreenWidth() const { return m_screenWidth; }
const int& getScreenHeight() const { return m_screenHeight; }
SDL_Window* getSDLWindow() { return m_sdlWindow; }
void swapBuffer();
private:
int m_screenWidth = 0; /** Screen width in pixels */
int m_screenHeight = 0; /** Screen height in pixels */
SDL_Window* m_sdlWindow = nullptr; /** Pointer to the SDL-created window object */
};
}
#endif // WINDOW_H