-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcSDL2WNDManager.h
More file actions
40 lines (30 loc) · 945 Bytes
/
cSDL2WNDManager.h
File metadata and controls
40 lines (30 loc) · 945 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 _SDL2WNDMANAGER_H
#define _SDL2WNDMANAGER_H
/*
==================================================================================
cSDL2WNDManager.h
==================================================================================
*/
#include <SDL.h>
#include <string>
#include <iostream>
using namespace std;
class cSDL2WNDManager
{
public:
cSDL2WNDManager();
bool initWND(string strWNDTitle, int iWidth, int iHeight);
bool initWND(string strWNDTitle, int iWidth, int iHeight, Uint32 wnd_Flags);
void CheckSDLError(int line);
SDL_Window* getSDLWindow();
SDL_GLContext getSDL_GLContext();
SDL_Renderer* getSDLRenderer();
static cSDL2WNDManager* getInstance();
private:
static cSDL2WNDManager* pInstance;
SDL_Window *mainWindow;
SDL_GLContext mainContext;
SDL_Renderer* theRenderer;
bool createSDLWnd(string strWNDTitle, int iWidth, int iHeight, Uint32 wnd_Flags);
};
#endif