OpenGL in D2

Nrgyzer nrgyzer at gmail.com
Wed Feb 23 14:32:41 PST 2011


== Auszug aus Sequ (user at example.net)'s Artikel
> Quoted from Nrgyzer:
> > On windows you've to create a folder called "lib"
> > before you run the command above - I currently
> > can't say it exactly if it's needed on linux, too.
> I did need to create a 'lib' directory before running 'make -
flinux.mak DC=dmd'.
> > After it compiled, you can copy all the created
> > lib-files to the lib-folder
> My 'lib' folder was in /usr/lib, although that folder didn't
contain 'phobos.lib',
> but 'libphobos2.a'. Hopefully that works correctly.
> > Copy the content of the "import"-dir to a
> > location where you've all your binding for D
> For now, I've just copied it into an 'import' folder in the same
folder as my
> source code. I suspect the correct directory is '/usr/include/d/dmd/
druntime/import'.
> I got an SDL example working by then using the command:
> dmd -L-lDerelictGL -L-lDerelictGLU -L-lDerelictUtil -L-lDerelictSDL
test_sdl.d
> but unfortunately I couldn't get my example working, because it
requires GLUT and
> the derelict library doesn't have that included. I'd actually
prefer to use GLUT
> and also, eventually, other obscure C libraries that I know no-one
else would have
> ported, but I suppose I'll take a look at the links provided in
Trass3r's post
> before asking more about that.

As I know, GLUT was also ported (http://www.yage3d.net/host/
derelict.glut.zip). I also tried it with DMD and Derelict - both V1,
but I can't get it to work. I think the mistake was on my own, but I
didn't spend them much time. The binding is from 2006 (or 2007) and
for those I don't suggest you to use it, especially I think it
doesn't work with DMD 2 and/or Derelict 2.

> > I hope this helped :)
> Thanks, yes that was quite helpful!
> Quoted from Dmitry Olshansky:
> > Sadly your file goes like rubbish for me, is
> > that base64 ?
> Yeah, I see it turned out odd, but I'm using the web interface to
post here (it
> seems my Thunderbird in the Lab can't access the news server from
behind all the
> firewalls - or something). The file is actually just one of the
first examples
> from the OpenGL tutorials.



More information about the Digitalmars-d-learn mailing list