Re: How's it done?

Carl Witty <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.