sgltk 0.6
Simple OpenGL Tool Kit
Loading...
Searching...
No Matches
core.h
1#ifndef __CORE_H__
2#define __CORE_H__
3
9#define check_gl_error(message) do{\
10 sgltk::_check_error(message, __FILE__, __LINE__);\
11 }while(0)
12
13#ifdef __WIN32__
14 #include <windows.h>
15#endif
16
17#include "config.h"
18
19#include <GL/glew.h>
20#include <GL/glu.h>
21/*#ifdef _WIN32
22 #include <GL/GL.h>
23#else
24 #include <GL/gl.h>
25#endif*/
26
27#include <string>
28#include <chrono>
29#include <thread>
30#include <limits>
31#include <iostream>
32#include <map>
33#include <vector>
34#include <algorithm>
35
36#define GLM_FORCE_RADIANS
37#include <glm/glm.hpp>
38#include <glm/gtc/type_ptr.hpp>
39#include <glm/gtx/transform.hpp>
40#include <glm/gtc/matrix_transform.hpp>
41
42#include <SDL2/SDL.h>
43#ifdef HAVE_SDL_TTF_H
44 #include <SDL2/SDL_ttf.h>
45#endif //HAVE_SDL_TTF_H
46#include <SDL2/SDL_image.h>
47#include <SDL2/SDL_opengl.h>
48
49#include <assimp/Importer.hpp>
50#include <assimp/scene.h>
51#include <assimp/postprocess.h>
52
53namespace sgltk {
54 extern bool initialized;
55
56 extern std::string error_string;
57
61 static std::string executable_path;
62
67 bool init_glew();
68
73 bool init_img();
74 void quit_img();
75
80 bool init_sdl();
81 void quit_sdl();
82
83#ifdef HAVE_SDL_TTF_H
88 bool init_ttf();
89 void quit_ttf();
90#endif //HAVE_SDL_TTF_H
91
96 bool init_lib();
97 void quit_lib();
98
99 void _check_error(std::string message, std::string file, unsigned int line);
100};
101
102#endif