[HOpenGL] How's it done?

Carl Witty cwitty at newtonlabs.com
Fri Sep 23 20:02:17 EDT 2005


On Fri, 2005-09-23 at 10:53 +0200, Sven Panne wrote:
> In a nutshell: For a new "nice" OpenGL binding I would recommend that at least 
> the token (un-)marshalers get generated semi-automatically (they are a lot of 
> boring work with lots of possibilities for unrecognised typos), but the rest 
> can be done by hand. For a plain 1:1 mapping of the C API, things can 
> probably be automated almost completely via the Mesa XML description. So the 
> choice is yours... :-)

Another possibility is to modify the GLEW (OpenGL Extension Wrangler,
http://glew.sourceforge.net) source.  As part of the build process, it
downloads the OpenGL extension specifications (the .txt files) and
parses them.  It then calls several Perl scripts to convert the
information into several target formats: C .h files, C .c "wrapper"
files, HTML documentation, and .rc files (which seem to be Windows
linker control files).  It shouldn't be too hard to add OCaml as a
target.

Carl Witty




More information about the HOpenGL mailing list