Skip to content

Commit

Permalink
c: don't warn on undefined GLAD_GLES2_USE_SYSTEM_EGL (#461)
Browse files Browse the repository at this point in the history
Check for a defined variable instead of a 1/0 flag, for symmetry with
GLAD_GL, GLAD_GLES2 and other user-facing defines.
  • Loading branch information
haasn authored Mar 16, 2024
1 parent adc3d7a commit 463b2b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glad/generator/c/templates/loader/gles2.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
typedef __eglMustCastToProperFunctionPointerType (GLAD_API_PTR *PFNEGLGETPROCADDRESSPROC)(const char *name);
#endif
extern __eglMustCastToProperFunctionPointerType emscripten_GetProcAddress(const char *name);
#elif GLAD_GLES2_USE_SYSTEM_EGL
#elif defined(GLAD_GLES2_USE_SYSTEM_EGL)
#include <EGL/egl.h>
typedef __eglMustCastToProperFunctionPointerType (GLAD_API_PTR *PFNEGLGETPROCADDRESSPROC)(const char *name);
#else
Expand Down Expand Up @@ -94,7 +94,7 @@ 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
#ifndef GLAD_GLES2_USE_SYSTEM_EGL
if (eglGetProcAddress == NULL) {
return 0;
}
Expand Down

0 comments on commit 463b2b2

Please sign in to comment.