> I've found a few OpenGL projects, like bindings > (http://www.dsource.org/projects/bindings/) and derelict > (http://www.dsource.org/projects/derelict/), but I still can't find any way to > easily use or install them (for D2 on Ubuntu).
Use derelict2 from svn and xfBuild. Then you just need to tell dmd where derelict is via -I > I'd have thought that, since D > interfaces so well with C, just using C libraries wouldn't require specific > wrapper libraries, but it seems an automated method for converting C headers > to D isn't currently possible? Derelict does a lot more, it hides all the nasty handling of different OpenGL versions that might be installed along with extension loading. To my knowledge there are several tools to convert C headers to D import modules: - htod, which is crappy. Since it's based on dmc, it nearly always complains about header files and the like; it doesn't translate preprocessor conditional compilation to versions or static if and almost always messes something up (const or whatever, can't remember) - SWIG, which I haven't tried yet for that purpose. But I think it will have the same problem with preprocessor conditional compilation. - c2d, don't know how good it works: http://dsource.org/projects/visuald/browser/trunk/c2d - bcd, which is obviously abandoned: http://www.dsource.org/projects/bcd