SDL* and GL bindings
Anders F Björklund
afb at algonet.se
Sun May 21 01:32:37 PDT 2006
Bruno Medeiros wrote:
> Anders's:
> I assume the latest bindings are those of http://www.algonet.se/~afb/d/
> am I right?
Yeah, although not in the zip files but *only* in the cvs section.
But I just updated the old versions that were provided by DedicateD,
and are also available from Japan: http://shinh.skr.jp/d/porting.html
A recent post included more modern/open source versions of the headers,
built from Mesa OpenGL and FreeGLUT instead of "my" SGI OpenGL and GLUT.
http://www.digitalmars.com/d/archives/digitalmars/D/announce/2982.html
> How does one work with the bindings? I don't know if they are supposed
> to be compiled, or just imported header-style, as no doc/readme explains
> it.
The makefiles and sample projects are all in the CVS for now, sorry.
Basically I just include everything in sdl/*.d and link it with SDL ?
(similar to how you use it from C, so it's wasn't very documented no)
> And in any way:
> - Compilation fails (at least the easy way) because of the mismatched
> module names. What's up with that? Why do only sdl.main and sdl.sdl have
> module statements?
The other ones just had implicit names, since they're all in "sdl"...
> - Importing as headers should work if one doesn't use
> SDL_InitApplication, or so I thought, but it still fails because of a
> missing:
> Error 42: Symbol Undefined __init_6events9SDL_Event
> caused by the "wchar unicode" of "SDL_keysym" which has a non-zero init.
> Of course, it took me a while to figure this all out.
It should work with the mentioned Makefile, which builds a D library
(some of the SDL import modules do generate code, it's inevitable)
But when I said that I should really, really package it up better -
this is what I meant. It works for me, but I haven't documented it.
Once I update the headers to SDL 1.2.10 (etc), I will package it up too.
It will probably only work with GDC, but Derelict is good for DMD use ?
I also promised to write a tutorial for it, similar to the ones at:
http://dmedia.dprogramming.com/Main/Tutorials
--anders
More information about the Digitalmars-d
mailing list