Where do I find OpenGL spec files?

I’ve heard people talk about some OpenGL spec files (for example here, here or here) that are handy for generating code to make libraries that enable the use of OpenGL. I am planning on making such a library that loads OpenGL functions for Python (and I am aware that there are such libraries already, but I am doing this as a learning experience).

When visiting the OpenGL registry, I found some PDF files (e.g. this one), but no “*.spec” files. Either I am totally blind or I am looking at the wrong place.

I would greatly appreciate any help on finding said spec files.

1 Like

You’re talking about fairly old posts. The old “*.spec” files are no longer being updated. The equivalent information now lives in a theoretically easier-to-parse XML format. These files contain all of desktop OpenGL and OpenGL ES.

You can find these files on this Khronos OpenGL GitHub project. They used to be linked from the OpenGL registry page, but I can’t find them anymore.

I am doing this as a learning experience

Be advised: the only thing you will learn is that the XML format was designed for C and is therefore poorly designed for interfacing with any other language. Yes, you can do it, but you’re going to have to write a bunch of regexes/parsers to be able to figure out what the actual type of a parameter is.

How useful that knowledge is is up to you, of course. I’m just pointing out that reinventing this particular wheel won’t teach you much.

The link to https://www.khronos.org/registry/OpenGL/xml/README.md was in the top-level index page, and I just added one at the top of each individual API index page.

1 Like