skaslev/gl3w

Generate gl3w.h directly from XML

Opened this issue · 1 comments

Khronos generates their GL headers (including glcorearb.h) from XML files using a Python script (https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/genheaders.py).

Would it make sense for gl3w to parse the structured XML directly, rather than interpreting the generated headers? Less scope for error imho.

OK this is old but I'll add a comment anyway: possible but a LOT of work.
The official header generator that takes XML and creates .h files can be downloaded from opengl.org. It is about 1800 lines of Python, although it is a bit more complicated because it has to handle older versions of OpenGL plus EGL and GLES as well.
I started writing my own loader generator for just OpenGL 3/4 from XML and it's over 900 lines of code without being complete yet.
gl3w is amazingly small and simple by comparison.