Win32 + OpenGL bindings
Diggory
diggsey at googlemail.com
Fri Apr 19 20:26:27 PDT 2013
I've been trying to write a win32 app using opengl in D, but none
of the bindings I've found have been sufficient:
- core.sys.windows.windows:
Missing large parts of wingdi.h, including PFD_* constants,
ChoosePixelFormat(), SwapBuffers(), wgl*() functions.
- win32.windows:
Apparantly out of date and gives linker errors, although it does
declare all the functions needed.
- derelict.util.wintypes:
Declares a small number of useful windows functions, many of
which conflict with those declared in "core.sys.windows.windows"
(such as PIXELFORMATDESCRIPTOR). However, "SetPixelFormat" is not
declared.
- derelict.opengl.gl:
Has all of opengl plus wgl* functions needed for windows, but has
more dependencies than an ideal opengl binding would have.
Why isn't there a simple relationship between C/C++ header files
and D modules, instead of this weird mix where some things are
duplicated and others not declared at all?
All of the windows specific functions including wgl* are supposed
to be in "windows.h", and opengl functions in "gl/gl.h"
It's a shame because I really like the ideas behind D - in fact
the reason I found it is that I'd come up with a whole bunch of
ideas I wanted in an ideal language and it turned out D already
implemented them all...
More information about the Digitalmars-d-learn
mailing list