diff --git a/source/lib/ogl.cpp b/source/lib/ogl.cpp index 430a89a8f3..d5ff4bb3d7 100644 --- a/source/lib/ogl.cpp +++ b/source/lib/ogl.cpp @@ -32,13 +32,6 @@ #include -static int GLVersion; - -bool ogl_HaveVersion(int major, int minor) -{ - return GLAD_MAKE_VERSION(major, minor) <= GLVersion; -} - const char* ogl_GetErrorName(GLenum err) { #define E(e) case e: return #e; @@ -86,39 +79,3 @@ void ogl_WarnIfErrorLoc(const char *file, int line) if(error_enountered) debug_printf("%s:%d: OpenGL error(s) occurred: %s (%04x)\n", file, line, ogl_GetErrorName(first_error), (unsigned int)first_error); } - -//---------------------------------------------------------------------------- -// feature and limit detect -//---------------------------------------------------------------------------- - -bool ogl_Init(void* (load)(const char*)) -{ - GLADloadfunc loadFunc = reinterpret_cast(load); - if (!loadFunc) - return false; - -#define LOAD_ERROR(ERROR_STRING) \ - if (g_Logger) \ - LOGERROR(ERROR_STRING); \ - else \ - debug_printf(ERROR_STRING); \ - -#if !CONFIG2_GLES - GLVersion = gladLoadGL(loadFunc); - if (!GLVersion) - { - LOAD_ERROR("Failed to load OpenGL functions."); - return false; - } -#else - GLVersion = gladLoadGLES2(loadFunc); - if (!GLVersion) - { - LOAD_ERROR("Failed to load GLES2 functions."); - return false; - } -#endif -#undef LOAD_ERROR - - return true; -} diff --git a/source/lib/ogl.h b/source/lib/ogl.h index 1ea229567e..905fc03b10 100644 --- a/source/lib/ogl.h +++ b/source/lib/ogl.h @@ -37,20 +37,6 @@ # include #endif -/** - * initialization: import extension function pointers and do feature detect. - * call before using any other function. - * fails if OpenGL not ready for use. - * TODO: move loading functionality to GL backend. - **/ -extern bool ogl_Init(void* (load)(const char*)); - -/** - * make sure the OpenGL implementation version matches or is newer than - * the given version. - */ -extern bool ogl_HaveVersion(int major, int minor); - //----------------------------------------------------------------------------- // errors