-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.h
More file actions
40 lines (30 loc) · 732 Bytes
/
Window.h
File metadata and controls
40 lines (30 loc) · 732 Bytes
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
#ifndef WINDOW_H
#define WINDOW_H
#if defined (__APPLE__)
#define GLFW_INCLUDE_GLCOREARB
#define GL_SILENCE_DEPRECATION
#else
#define GLEW_STATIC
#include <GL/glew.h>
#endif
#include <GLFW/glfw3.h>
#include <stdexcept>
#include <iostream>
struct WindowDimensions {
int width;
int height;
};
namespace gps {
class Window {
public:
void Create(int width=800, int height=600, const char *title="OpenGL Project");
void Delete();
GLFWwindow* getWindow();
WindowDimensions getWindowDimensions();
void setWindowDimensions(WindowDimensions dimensions);
private:
WindowDimensions dimensions;
GLFWwindow *window;
};
}
#endif //WINDOW_H