PDA

View Full Version : standard C code to extract .spec info



Brandon J. Van Every
10-13-2011, 01:02 AM
Is there some standard C code "hiding somewhere" to extract .spec info? Some of the .spec files refer to something called libspec. I found some code for that in the old SGI Sample Implementation, but I haven't found any modern supported equivalent. Is Khronos sitting on something like that? Is it available somewhere and I just haven't found it?

There are of course various libraries like glew, glfw, gl3w, glload, etc. They all do the same underlying job differently. My main interest is I'm trying to implement a programming language. It will need a C FFI and so extracting the OpenGL function signatures etc. is useful.

Alfonse Reinheart
10-13-2011, 01:06 AM
I don't think there is any standard system for parsing the .spec format. But really, it's not that difficult.

If you want something more modern that's a bit easier to chew, I maintain XML versions of the .spec files (https://bitbucket.org/alfonse/gl-xml-specs/downloads). I use these to generate my OpenGL loader for the SDK.

Brandon J. Van Every
10-13-2011, 05:50 PM
Thanks. The less reinventing the wheel, the better.

Ludde
10-14-2011, 12:29 PM
Funny, I always think about it the opposite way. "The more reinventing the wheel, the better" atleast for yourself... :-)