outdated examples written for early OpenGL versions
outdated code that I probably need to update
I am completely lost in the specs, versions and notations that C coders use, so I’d like to start with the two questions:
What is the primary (tested) source of OpenGL API for machines? PDF doesn’t work, because it requires human to process.
Is there already an official list of OpenGL functions per version?
I need a simple plain list of functions in alphabetic order, maybe with parameters, so I can run a diff on them, compare and see which ones should be removed from my code to be OpenGL 4 or OpenGL 2 compliant.
I guess you’ve seen that I explicitly mentioned that PDF won’t work. Is everything so bad that only PDF is available? Parsing PDF is painful - it is made by humans who make mistakes. And it is very hard to track updates to this PDF (if possible at all).
This is sort of an odd-ball use, but you could use my glLoadGen tool to generate exactly that. It will generate headers/source for loaders for the specific OpenGL version you want. So you could simply copy-and-paste the header definitions out of them.
it is made by humans who make mistakes.
Yes. So are all of the other sources of OpenGL information.
It would be easier to write an XSLT transform that looked for functions who’s version tag was less than or equal to some number. Or, again, you could just use glLoadGen to make headers and copy them out to wherever you need them.
Actually, you could use glLoadGen’s parsing system to write your own generation style, who’s sole purpose is to simply dump all of the function names for a version into a given file. It’s a bit complex (and I haven’t finished all the docs explaining everything about the process), but it’s very doable.
Are there any other known .spec tools (something in Python will be easier to hack)?
I don’t know the data structure - is it possible to use generic template engine for this generator? Like http://mustache.github.com/ ?
Regal looks like one awesome piece of code. Is the information in gl.pygenerated automatically from gl.spec or it is manually maintained? I see that Export.py is the entrypoint into the output generation toolchain, but there is nothing about gl.spec parsing.
regal is one step further from what I am trying to do. Very professional presentation and positioning.
I try to create a simple OpenGL support diagnostic utility that will output information about the supported API and (maybe) give some recommendations how to improve it. When regal jumps directly into rendering, I want to detect known problems before they occur and warn about them.