Better native D 2D graphics library?

Gan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Feb 7 17:39:18 PST 2015


On Saturday, 7 February 2015 at 23:29:01 UTC, Namespace wrote:
> On Saturday, 7 February 2015 at 22:09:03 UTC, Gan wrote:
>> Is there a better D graphics library in the works?
>>
>> I'm using SFML(which is very easy and has lots of features) 
>> but it seems to use a lot of ram(if you leave it running for a 
>> while on a graphic intensive scene) and trying to make it 
>> include the dependencies with the compiled executable is 
>> complicated.
>>
>> Is there a D 2D graphics library that's just as easy, cross 
>> platform, doesn't use X11, allows drawing to off-screen 
>> buffers and drawing those to screen? (plus supports nice 
>> drawing of shapes, circles, rectangles, lines)
>>
>> I'm probably asking too much- I doubt such a thing exists.
>
> I once wrote such a library: https://github.com/Dgame/Dgame
> But since I left D I don't maintain it. Maybe that will change 
> in the next few weeks. But otherwise you are free to use or 
> improve it.

That's really cool. Very very similar to SFML.

Only thing that makes me concerned is:
static immutable string Disk = "D";
static immutable string Mode = "Release";

pragma(lib, Disk ~ 
":\\D\\dmd2\\src\\ext\\derelict\\lib\\dmd\\DerelictSDL2.lib");
pragma(lib, Disk ~ 
":\\D\\dmd2\\src\\ext\\derelict\\lib\\dmd\\DerelictUtil.lib");
pragma(lib, Disk ~ 
":\\D\\dmd2\\src\\ext\\derelict\\lib\\dmd\\DerelictGL3.lib");

pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameInternal.lib");
pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameAudio.lib");
pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameGraphics.lib");
pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameSystem.lib");
pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameMath.lib");
pragma(lib, Disk ~ ":\\D\\dmd2\\src\\ext\\Dgame\\lib\\" ~ Mode ~ 
"\\DgameWindow.lib");

I'm not entirely sure what that is or if it's cross-compatible 
friendly or sharing-with-friends friendly.
Though I really hope you re-maintain it.


More information about the Digitalmars-d-learn mailing list