www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D Graphics Library

reply Kenneth Dallmann <fake 123.con> writes:
Hello,

    I'm just recently getting back into programming, studying D as 
a new language.
I know that D has access to C libraries.

    What would be a good choice of graphics library to use? given 
that it must allow commercial use and be opensource, so no GPL.

    I wouldn't want to use anything in C++, preferably it would be 
in D but C could
work too.

     Do all libraries work with the LDC and therefor Emscripten?
Sep 14 2021
next sibling parent reply jfondren <julian.fondren gmail.com> writes:
On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth Dallmann 
wrote:
 Hello,

    I'm just recently getting back into programming, studying D 
 as a new language.
 I know that D has access to C libraries.

    What would be a good choice of graphics library to use? 
 given that it must allow commercial use and be opensource, so 
 no GPL.

    I wouldn't want to use anything in C++, preferably it would 
 be in D but C could
 work too.

     Do all libraries work with the LDC and therefor Emscripten?
games? Try https://github.com/schveiguy/raylib-d example (transliteration of C): https://gist.github.com/jrfondren/7459713e2a4ad8d62d297abd4b0949d8 GUIs? try https://gtkd.org/ examples at https://gtkdcoding.com/ others? try 'dub search graphics'
Sep 14 2021
parent reply Kenneth Dallmann <fake 123.con> writes:
 games? Try https://github.com/schveiguy/raylib-d
 example (transliteration of C): 
 https://gist.github.com/jrfondren/7459713e2a4ad8d62d297abd4b0949d8

 GUIs? try https://gtkd.org/
 examples at https://gtkdcoding.com/

 others? try 'dub search graphics'
I looked at GTKD, maybe a possible solution. It looks like you've been about to use the first library you mentioned well, but in its description it says some components are broken. The LGPL doesn't require an open source copyright for linked works, according to wikipedia, but as I read through the license it made me feel confused, which may not be too difficult. I don't think I understand it easily.
Sep 14 2021
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 9/14/21 4:33 PM, Kenneth Dallmann wrote:
 games? Try https://github.com/schveiguy/raylib-d
 example (transliteration of C): 
 https://gist.github.com/jrfondren/7459713e2a4ad8d62d297abd4b0949d8

 GUIs? try https://gtkd.org/
 examples at https://gtkdcoding.com/

 others? try 'dub search graphics'
I looked at GTKD, maybe a possible solution. It looks like you've been about to use the first library you mentioned well, but in its description it says some components are broken.
No, some links are broken. The code was resurrected from a guy who deleted his github account. We have the code, but not the other stuff linked (e.g. github wiki pages). Rereading it says "many things in here are broken". By "here" I meant, this readme file. Oops, I can see how that was poorly worded, sorry! -Steve
Sep 14 2021
parent reply Kenneth Dallmann <fake 123.con> writes:
 No, some links are broken. The code was resurrected from a guy 
 who deleted his github account. We have the code, but not the 
 other stuff linked (e.g. github wiki pages).

 Rereading it says "many things in here are broken".  By "here" 
 I meant, this readme file. Oops, I can see how that was poorly 
 worded, sorry!

 -Steve
Wow, I see. I was just perusing a source file there, looks like there are lots of comments to explain things. It still may be difficult for me if nobody can spoon feed it.
Sep 14 2021
parent Steven Schveighoffer <schveiguy gmail.com> writes:
On 9/14/21 5:43 PM, Kenneth Dallmann wrote:
 No, some links are broken. The code was resurrected from a guy who 
 deleted his github account. We have the code, but not the other stuff 
 linked (e.g. github wiki pages).

 Rereading it says "many things in here are broken".  By "here" I 
 meant, this readme file. Oops, I can see how that was poorly worded, 
 sorry!
 Wow, I see. I was just perusing a source file there, looks like there are lots of comments to explain things.  It still may be difficult for me if nobody can spoon feed it.
All the comments are copied directly from the original library. So you can use the very excellent and numerous resources for the C raylib library to help you. I also highly recommend Ki Rill's [D game development youtube series](https://www.youtube.com/playlist?list=PLgM-lc_kSqFQPF UXgmFZpZalqcrSofe-) that uses raylib. -Steve
Sep 14 2021
prev sibling next sibling parent Adam Ruppe <destructionator gmail.com> writes:
On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth Dallmann 
wrote:
    What would be a good choice of graphics library to use?
i have code for basically everything imaginable http://arsd-official.dpldocs.info/arsd.simpledisplay.html is kinda comparable to the SDL library. I blogged about the vector graphics thing yesterday http://dpldocs.info/this-week-in-d/Blog.Posted_2021_09_13.html#what-adam-is-working-on that nanovega module is comparable to html5 canvas. (though i wrote that with the assumption that most the readers already know what I'm talking about) I also have the minigui library. You can click navigation links on the left of the thing.
     Do all libraries work with the LDC and therefor Emscripten?
ldc yes, emscripten idk. But my libs I did partial ports for http://webassembly.arsdnet.net/
Sep 14 2021
prev sibling next sibling parent reply Guillaume Piolat <first.last gmail.com> writes:
On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth Dallmann 
wrote:
    What would be a good choice of graphics library to use?
What do you want to do?
Sep 14 2021
parent reply Kenneth Dallmann <fake 123.con> writes:
On Tuesday, 14 September 2021 at 22:47:30 UTC, Guillaume Piolat 
wrote:
 On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth Dallmann 
 wrote:
    What would be a good choice of graphics library to use?
What do you want to do?
I would like to write web-apps for Wasm.
Sep 16 2021
parent Guillaume Piolat <first.last gmail.com> writes:
On Thursday, 16 September 2021 at 13:40:33 UTC, Kenneth Dallmann 
wrote:
 On Tuesday, 14 September 2021 at 22:47:30 UTC, Guillaume Piolat 
 wrote:
 On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth 
 Dallmann wrote:
    What would be a good choice of graphics library to use?
What do you want to do?
I would like to write web-apps for Wasm.
http://webassembly.arsdnet.net/ https://github.com/skoppe/spasm
Sep 16 2021
prev sibling parent tastyminerals <tastyminerals gmail.com> writes:
On Tuesday, 14 September 2021 at 19:44:17 UTC, Kenneth Dallmann 
wrote:
 Hello,

    I'm just recently getting back into programming, studying D 
 as a new language.
 I know that D has access to C libraries.

    What would be a good choice of graphics library to use? 
 given that it must allow commercial use and be opensource, so 
 no GPL.

    I wouldn't want to use anything in C++, preferably it would 
 be in D but C could
 work too.

     Do all libraries work with the LDC and therefor Emscripten?
I use tkd a D version of Python Tkinter. It is not developed anymore :( But for simple things it is very very easy to get started and has nice docs with examples for an easy start. If you even tried Tkinter don't hesitate. It is definitely easier than Gtk port.
Sep 20 2021