2021-11-12 12:49:49 +00:00
|
|
|
diff --git a/thirdparty/glad/gl.c b/thirdparty/glad/gl.c
|
2024-04-05 08:20:13 +00:00
|
|
|
index 3f0884a3dc..38ecb514bd 100644
|
2021-11-12 12:49:49 +00:00
|
|
|
--- a/thirdparty/glad/gl.c
|
|
|
|
+++ b/thirdparty/glad/gl.c
|
2024-04-05 08:20:13 +00:00
|
|
|
@@ -2462,7 +2462,7 @@ static GLADapiproc glad_gl_get_proc(void *vuserptr, const char *name) {
|
2021-11-12 12:49:49 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
-static void* _glad_GL_loader_handle = NULL;
|
|
|
|
+static void* _glad_gles_loader_handle = NULL;
|
|
|
|
|
|
|
|
static void* glad_gl_dlopen_handle(void) {
|
|
|
|
#if GLAD_PLATFORM_APPLE
|
2024-04-05 08:20:13 +00:00
|
|
|
@@ -2484,11 +2484,11 @@ static void* glad_gl_dlopen_handle(void) {
|
2021-11-12 12:49:49 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
- if (_glad_GL_loader_handle == NULL) {
|
|
|
|
- _glad_GL_loader_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0]));
|
|
|
|
+ if (_glad_gles_loader_handle == NULL) {
|
|
|
|
+ _glad_gles_loader_handle = glad_get_dlopen_handle(NAMES, sizeof(NAMES) / sizeof(NAMES[0]));
|
|
|
|
}
|
|
|
|
|
|
|
|
- return _glad_GL_loader_handle;
|
|
|
|
+ return _glad_gles_loader_handle;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct _glad_gl_userptr glad_gl_build_userptr(void *handle) {
|
2024-04-05 08:20:13 +00:00
|
|
|
@@ -2514,7 +2514,7 @@ int gladLoaderLoadGL(void) {
|
2021-11-12 12:49:49 +00:00
|
|
|
int did_load = 0;
|
|
|
|
struct _glad_gl_userptr userptr;
|
|
|
|
|
|
|
|
- did_load = _glad_GL_loader_handle == NULL;
|
|
|
|
+ did_load = _glad_gles_loader_handle == NULL;
|
|
|
|
handle = glad_gl_dlopen_handle();
|
|
|
|
if (handle) {
|
|
|
|
userptr = glad_gl_build_userptr(handle);
|
2024-04-05 08:20:13 +00:00
|
|
|
@@ -2532,9 +2532,9 @@ int gladLoaderLoadGL(void) {
|
2021-11-12 12:49:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
void gladLoaderUnloadGL(void) {
|
|
|
|
- if (_glad_GL_loader_handle != NULL) {
|
|
|
|
- glad_close_dlopen_handle(_glad_GL_loader_handle);
|
|
|
|
- _glad_GL_loader_handle = NULL;
|
|
|
|
+ if (_glad_gles_loader_handle != NULL) {
|
|
|
|
+ glad_close_dlopen_handle(_glad_gles_loader_handle);
|
|
|
|
+ _glad_gles_loader_handle = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/thirdparty/glad/glad/gl.h b/thirdparty/glad/glad/gl.h
|
2024-04-05 08:20:13 +00:00
|
|
|
index 77c6f33cab..1301d10b65 100644
|
2021-11-12 12:49:49 +00:00
|
|
|
--- a/thirdparty/glad/glad/gl.h
|
|
|
|
+++ b/thirdparty/glad/glad/gl.h
|
|
|
|
@@ -67,6 +67,7 @@
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define GLAD_GL
|
|
|
|
+#define GLAD_GLES2
|
|
|
|
#define GLAD_OPTION_GL_LOADER
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|