Voxeloop  0.1.0
Musical Loop Generation in Voxel World
WindowManager.hpp
Go to the documentation of this file.
1 #ifndef CORE_INCLUDE_WINDOWMANAGER_HPP
2 #define CORE_INCLUDE_WINDOWMANAGER_HPP
3 
4 // We need to turn clang-format off here to prevent it from including glfw
5 // before glad
6 // clang-format off
7 #include <glad/gl.h>
8 #include <GLFW/glfw3.h>
9 // clang-format on
10 #include <iostream>
11 
13 public:
14  void create(const char *title, int width, int height);
15  bool isCloseRequested();
16  void close(); // close window
17  static void clear();
18  void update();
19  void render();
20 
21  void cleanup();
22 
23  static GLFWwindow *getWindow();
24  static int getWidth();
25  static int getHeight();
26 
27 private:
28  static GLFWwindow *m_window;
29  static int m_width;
30  static int m_height;
31 
32  int m_glMajor = 4;
33  int m_glMinor = 5;
34 };
35 
36 #endif // CORE_INCLUDE_WINDOWMANAGER_HPP
Definition: WindowManager.hpp:12
static int m_width
Definition: WindowManager.hpp:29
static void clear()
Definition: WindowManager.cpp:87
static GLFWwindow * getWindow()
Definition: WindowManager.cpp:110
static int getHeight()
Definition: WindowManager.cpp:107
void update()
Definition: WindowManager.cpp:81
void cleanup()
Definition: WindowManager.cpp:97
void close()
Definition: WindowManager.cpp:78
int m_glMinor
Definition: WindowManager.hpp:33
void render()
Definition: WindowManager.cpp:84
static GLFWwindow * m_window
Definition: WindowManager.hpp:28
void create(const char *title, int width, int height)
Definition: WindowManager.cpp:11
static int m_height
Definition: WindowManager.hpp:30
static int getWidth()
Definition: WindowManager.cpp:104
bool isCloseRequested()
Definition: WindowManager.cpp:73
int m_glMajor
Definition: WindowManager.hpp:32