glad
glad copied to clipboard
Support generating GL types, GL functions and GL enums in different files
Currently, everything is declared in glad.h.
This is a problem for wrapper classes that expose GL types via function parameters/return values as we are forced to either:
- Redeclare ourself the GL types (GLint, GLenum, ...) in the class's header, which is redundent and not portable.
- Include the whole
glad.hin the class's header, leaking GL functions, GL enums and macro definitions everywhere and increasing compilation time.
Splitting the GL types, GL functions and GL enums into three (or more?) different files (glad_types.h, glad_functions.h and glad_enums.h for example) could solve this issue.
We could simply include the small glad_types.h in the class's header (and eventually glad_enums.h if we need default value for GLenum parameters) and include the big glad_functions.h in the class's cpp.