/
context.h
55 lines (43 loc) · 1.18 KB
/
context.h
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* context.h
* Copyright (C) 2012, Lucas Dohring.
*
* This code is free software; you can redistribute it and/or
* modify it under the terms of the Artistic License 2.0 as
* published by the Perl Foundation. For details, see the
* full text of the license in the file LICENSE.
*
* This program is distributed in the hope that it will be
* useful, but it is provided “as is” and without any express
* or implied warranties. For details, see the Artistic License 2.0
* for more details.
*
* You should have received a copy of the Artistic License 2.0
* along with this code. If not, see <http://www.perlfoundation.org/artistic_license_2_0>
*/
#include <GL/glew.h>
#include <glm/glm.hpp>
#include <thread>
#include <chrono>
#include <entity.h>
#ifndef RENDERCONTEXT_H
#define RENDERCONTEXT_H
namespace tvorba {
using namespace glm;
using namespace std;
class Context
{
public:
Context();
void init_graphics(char *title);
unsigned num_threads;
thread **threads;
SDL_Window *window;
SDL_GLContext gl_context;
mat4 view, projection;
Entity entities;
bool is_quiting;
int return_value;
~Context();
};
}
#endif // RENDERCONTEXT_H