www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Writing a screen saver in D what libraries will help?

reply Gary Willoughby <dev nomad.so> writes:
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.
Oct 12 2015
next sibling parent Gary Willoughby <dev nomad.so> writes:
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
Oct 12 2015
prev sibling next sibling parent reply welkam <wwwelkam gmail.com> writes:
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
Oct 12 2015
parent Adam D. Ruppe <destructionator gmail.com> writes:
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.
Oct 12 2015
prev sibling parent Adam D. Ruppe <destructionator gmail.com> writes:
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
Oct 12 2015