Standalone opengl bindings
Diggory
diggsey at googlemail.com
Sat May 4 20:58:50 PDT 2013
I wrote this mainly for my own benefit, but I figured it might be
useful to someone else. It's a small program which generates
opengl bindings for D directly from the specification.
https://github.com/Diggsey/OpenGL-D-Bindings
It generates a single file "gl.d" which by default will do no
more or less than what you'd get by including "gl/gl.h". This
will give you access to GL 1.1 functions.
You can then call "loadGL" passing in the opengl version and the
names of any extensions you want to use and it will automatically
load in the relevant functions. It does this at compile time so
at runtime it just loads precisely those functions which you
asked for.
It provides only the platform independent part of opengl - it
expects wgl***/glX*** functions to be provided by the platform
sdk. Unfortunately the built in windows bindings for D are fairly
useless, but I've forked druntime and phobos to use the windows
bindings from the dsource bindings project instead, which are far
better:
https://github.com/Diggsey/druntime
https://github.com/Diggsey/phobos/tree/win32-bindings
More information about the Digitalmars-d-announce
mailing list