glad
glad copied to clipboard
Inclusion guards for OpenGL ES headers
At the moment, GLAD guards against duplicate header inclusion using the following defines (in OpenGL ES mode; not sure if this is relevant to desktop contexts):
#ifdef __gl2_h_
#error OpenGL ES 2 header already included, remove this include, glad already provides it
#endif
#define __gl2_h_
#ifdef __gl3_h_
#error OpenGL ES 3 header already included, remove this include, glad already provides it
#endif
#define __gl3_h_
However, Khronos' headers use the following format:
#ifndef __gles2_gl3_h_
#define __gles2_gl3_h_ 1
Note the gles2_
prefix. Should glad's defines not match the Khronos ones to function correctly?
I believe the library would also benefit from additional guards for the newer ES 3.1 and 3.2 headers.
Related to https://github.com/glfw/glfw/issues/1695