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) {