Three people out of four dislike SDL

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 1 06:46:30 PST 2015


On Tuesday, 1 December 2015 at 14:37:18 UTC, Chris wrote:
> Can you write a small, compact, up to speed tutorial once 
> you've finished simpledisplay (set up, basic examples)? I'd 
> love to test it.

Well, simpledisplay itself isn't done, but it works for many 
things now (and myself and several other users make use of it 
now).

The big change is eventually I am going to change the module 
name, which is a breaking change, but otherwise I don't have 
major API changes in mind. (A big addition it needs though is 
Cocoa Mac OS X support again. It had it years ago then it fell 
away. I want to redo it when the new ObjC integration in D is 
done.)

But if you copy/paste the examples in the html file you should be 
able to get started. The code itself is in this collection:

https://github.com/adamdruppe/arsd

simpledisplay.d and color.d are the two files needed. Then you 
compile by just adding those two files to your build or I have 
also made a dub thing for it but I haven't really tested this yet:

http://code.dlang.org/packages/arsd-official%3Asimpledisplay/~master


I do need to write more docs and tutorials but you can play a 
little with the examples there - the event viewer is first in the 
example list to give you an idea of what input it gives, then the 
Pong game underneath that gives a fairly complete demo of basic 
drawing and input. It can also do things like create OpenGL 
contexts, which I have a demo of here: 
http://arsdnet.net/dcode/book/chapter_12/10/opengl.d

(The OpenGL bindings are mostly old, glBegin/glEnd stuff, because 
that's what I know [!!], but the same context creation works for 
new functions too so I'm adding that. Just commited a big batch 
of new stuff yesterday too.)


The audio and joystick parts are in my github repo... and 
basically work, but I'm still not completely happy with them yet.


More information about the Digitalmars-d mailing list