Removes unused code about GL version from OGL
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run

This commit is contained in:
Vladislav Belov 2026-07-08 20:54:11 +02:00
parent 11f78e5c1a
commit 63b4b35bd3
No known key found for this signature in database
GPG key ID: 353545E45DB9CCB3
2 changed files with 0 additions and 57 deletions

View file

@ -32,13 +32,6 @@
#include <cstring> #include <cstring>
static int GLVersion;
bool ogl_HaveVersion(int major, int minor)
{
return GLAD_MAKE_VERSION(major, minor) <= GLVersion;
}
const char* ogl_GetErrorName(GLenum err) const char* ogl_GetErrorName(GLenum err)
{ {
#define E(e) case e: return #e; #define E(e) case e: return #e;
@ -86,39 +79,3 @@ void ogl_WarnIfErrorLoc(const char *file, int line)
if(error_enountered) if(error_enountered)
debug_printf("%s:%d: OpenGL error(s) occurred: %s (%04x)\n", file, line, ogl_GetErrorName(first_error), (unsigned int)first_error); 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<GLADloadfunc>(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;
}

View file

@ -37,20 +37,6 @@
# include <glad/gl.h> # include <glad/gl.h>
#endif #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 // errors