9#define check_gl_error(message) do{\
10 sgltk::App::_check_error(message, __FILE__, __LINE__);\
16 #define EXPORT __declspec(dllexport)
22 #define EXPORT __declspec(dllimport)
53#define GLM_FORCE_RADIANS
54#define GLM_ENABLE_EXPERIMENTAL
56#include <glm/gtc/type_ptr.hpp>
57#include <glm/gtx/transform.hpp>
58#include <glm/gtc/matrix_transform.hpp>
60#define SDL_MAIN_HANDLED
64 #include <SDL2/SDL_ttf.h>
66 #include <SDL2/SDL_image.h>
67 #include <SDL2/SDL_opengl.h>
73 #include <SDL_image.h>
74 #include <SDL_opengl.h>
78 #include <assimp/Importer.hpp>
79 #include <assimp/scene.h>
80 #include <assimp/postprocess.h>
134 static bool initialized;
156 EXPORT
static bool init();
160 EXPORT
static void quit();
190 EXPORT
static bool init_ttf();
194 EXPORT
static void quit_ttf();
245 EXPORT
static void _check_error(std::string message, std::string file,
unsigned int line);
static void get_sys_info()
Gathers system information and populates the sys_info attribute.
static std::vector< std::string > error_string
A list of all error strings.
static void set_gl_version(int major, int minor)
Sets the OpenGL version.
static bool gl_version_manual
True if set_gl_version was called, false otherwise.
static bool init()
Initializes SGLTK.
static void _check_error(std::string message, std::string file, unsigned int line)
Outputs OpenGL error messages.
static bool enable_vsync(bool on)
Turns VSync on or off.
static struct SYS_INFO sys_info
System information.
static void set_depth_stencil_size(int depth_size, int stencil_size)
Sets the size of the depth and stencil buffers.
static bool chdir_to_bin(char **argv)
Changes the current working directory to the directory containing the executable.
static void enable_screensaver(bool enable)
Enables the screensaver.
static bool init_glew()
Initializes GLEW.
static bool init_img()
Initializes SDL2_img.
static void quit()
Deinitializes SGLTK.
static void quit_sdl()
Deinitializes SDL2.
static void quit_img()
Deinitializes SDL2_img.
static bool init_sdl()
Initializes SDL2.
static void set_msaa_sample_number(int number_samples)
Sets the number of samples used for multisample anti-aliasing.
std::vector< SDL_DisplayMode > desktop_display_modes
The display modes of each display.
std::string platform_name
The name of the platform.
int max_patch_vertices
The maximum number of vertices in a patch.
int max_tess_level
The maximum supported tessellation level.
int num_logical_cores
The number of logical cores.
int system_ram
The amount of ram in MB.
std::vector< SDL_Rect > display_bounds
Display bounds.
int num_displays
The number of displays.
std::vector< std::vector< SDL_DisplayMode > > supported_display_modes
A list of other supported display modes for every detected display.