Untitled Game engine no.5  1.0
Window.hpp
1 #ifndef WINDOW_H
2 #define WINDOW_H
3 #include <SDL2/SDL.h>
4 #include <string>
5 namespace Engine {
7  class Window {
8  private:
9  static unsigned int m_Width;
10  static unsigned int m_Height;
11  SDL_Window *m_Window;
12  SDL_GLContext m_Context;
13  std::string m_Title;
14 
15  public:
20  Window(std::string title, int width, int height);
21 
23  ~Window();
24 
26  void Shutdown();
27 
30  bool Init();
31 
33  //TODO: Not sure if this should be here or somewhere else
34  void SwapBuffers();
35 
37  static unsigned int GetWidth() { return m_Width; };
39  static unsigned int GetHeight() { return m_Height; };
40  };
41 
42 }
43 #endif
44 
Engine::Window::GetHeight
static unsigned int GetHeight()
Definition: Window.hpp:39
Engine::Window::Init
bool Init()
Definition: Window.cpp:16
Engine::Window::Shutdown
void Shutdown()
Shutdown the window.
Definition: Window.cpp:54
Engine::Window
Wrapper for the display window.
Definition: Window.hpp:7
Engine::Window::GetWidth
static unsigned int GetWidth()
Definition: Window.hpp:37
Engine::Window::SwapBuffers
void SwapBuffers()
Swap the buffers to render to the window.
Definition: Window.cpp:63
Engine::Window::Window
Window(std::string title, int width, int height)
Definition: Window.cpp:9
Engine
Definition: Animation.hpp:14
Engine::Window::~Window
~Window()
Destructor.
Definition: Window.cpp:14