forked from lokesh-sharma/GameEngine
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdisplay.h
More file actions
36 lines (30 loc) · 712 Bytes
/
display.h
File metadata and controls
36 lines (30 loc) · 712 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
#ifndef DISPLAY_INCLUDED_H
#define DISPLAY_INCLUDED_H
#include <string>
#include <SDL2/SDL.h>
#include"camera.h"
#include"transform.h"
class Display
{
public:
Display(const std::string& title);
int getWidth()const { return m_width;}
int getHeight()const { return m_height;}
void Clear(float r, float g, float b, float a);
void SwapBuffers();
void update();
void bindAsRenderTarget() ;
void clean();
bool isRunning() { return m_running;}
SDL_Window* getWindow() { return m_window;}
protected:
private:
void operator=(const Display& display) {}
Display(const Display& display) {}
bool m_running;
int m_width;
int m_height;
SDL_Window* m_window;
SDL_GLContext m_glContext;
};
#endif