/*!@file \brief core rendering support \details initializes the SDL-based rendering target and context. \author Mihrtec \date 2016 ----------------------------------------------------------------------------*/ #include #include #include #include #define ERROR_BUFFER_SIZE int video_init(void); const char * video_get_error(void); void video_quit(void); static char *video_error = 0; int video_init() { if (!gladLoadGLLoader((GLADloadproc) SDL_GL_GetProcAddress)) { video_error = "Failed to initialize OpenGL context"; return -1; } printf("OGL %d.%d\n", GLVersion.major, GLVersion.minor); return 0; } const char * video_get_error() { return video_error; } void video_quit() { }