blob: 79b9eb3ff8a0a7541e69772cfd688419b677b68b (
plain)
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 __JIN_RENDER_WINDOW
#define __JIN_RENDER_WINDOW
#include "SDL2/SDL.h"
namespace jin
{
namespace render
{
class Window
{
public:
void init(int w, int h, const char* t);
SDL_Window* getWnd();
SDL_GLContext getCtx();
static Window* get();
int getW();
int getH();
void swapBuffers();
private:
Window();
~Window();
static Window* g_wnd;
SDL_Window* wnd;
SDL_GLContext ctx;
int w, h;
};
}
}
#endif
|