From 9c0372a62a962374b5fd14cb21b4e9549034b2a0 Mon Sep 17 00:00:00 2001 From: Deal Date: Wed, 14 Feb 2024 12:06:42 +0800 Subject: [PATCH] Fix compile warning when GLAD_GLES2_USE_SYSTEM_EGL=1 --- glad/generator/c/templates/loader/gles2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glad/generator/c/templates/loader/gles2.c b/glad/generator/c/templates/loader/gles2.c index 3cbf73a4..aa0293a6 100644 --- a/glad/generator/c/templates/loader/gles2.c +++ b/glad/generator/c/templates/loader/gles2.c @@ -94,10 +94,11 @@ int gladLoaderLoadGLES2{{ 'Context' if options.mx }}({{ template_utils.context_a userptr.get_proc_address_ptr = emscripten_GetProcAddress; version = gladLoadGLES2{{ 'Context' if options.mx }}UserPtr({{ 'context, ' if options.mx }}glad_gles2_get_proc, &userptr); #else +#if !GLAD_GLES2_USE_SYSTEM_EGL if (eglGetProcAddress == NULL) { return 0; } - +#endif did_load = {{ loader_handle }} == NULL; handle = glad_gles2_dlopen_handle({{ 'context' if options.mx }}); if (handle != NULL) {