Thread overview
Writing a screen saver in D what libraries will help?
Oct 12, 2015
Gary Willoughby
Oct 12, 2015
Gary Willoughby
Oct 12, 2015
welkam
Oct 13, 2015
Adam D. Ruppe
Oct 13, 2015
Adam D. Ruppe
October 12, 2015
If I was writing a screensaver in D what libraries are available for opening a window and drawing sprites, etc on it. GPU accelerated if possible.

I'm using Ubuntu 14.04 and latest DMD compiler.
October 12, 2015
On Monday, 12 October 2015 at 19:16:10 UTC, Gary Willoughby wrote:
> If I was writing a screensaver in D what libraries are available for opening a window and drawing sprites, etc on it. GPU accelerated if possible.
>
> I'm using Ubuntu 14.04 and latest DMD compiler.

I've found Dgame which looks surprisingly good.

http://rswhite.de/dgame5/?page=tutorial
October 12, 2015
On Monday, 12 October 2015 at 19:16:10 UTC, Gary Willoughby wrote:
> If I was writing a screensaver in D what libraries are available for opening a window and drawing sprites, etc on it. GPU accelerated if possible.
>
> I'm using Ubuntu 14.04 and latest DMD compiler.

You will need to interface to C libraries like SDL. There are bidings for it on DUB called derelict-sdl2
October 13, 2015
On Monday, 12 October 2015 at 19:16:10 UTC, Gary Willoughby wrote:
> If I was writing a screensaver in D what libraries are available for opening a window and drawing sprites, etc on it. GPU accelerated if possible.


My simpledisplay.d might be able to do it but it doesn't fully wrap stuff like full screen windows yet (it isn't hard to use the platform-specific functions to ask for one though).

https://github.com/adamdruppe/arsd

simpledisplay.d and color.d

WIP docs here http://arsdnet.net/arsd/simpledisplay.html
October 13, 2015
On Monday, 12 October 2015 at 23:24:56 UTC, welkam wrote:
> You will need to interface to C libraries like SDL.

Not necessarily any beyond the operating system libs. In fact, for a screensaver, you might want to use lower level calls. I don't know how they are made anymore, but in Windows 95 (showing my knowledge's age...) there were a few special screen saver functions you needed to implement for it to be recognized by the properties sheet.

I don't know about Ubuntu at all though.