www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - NanoVG and OUI ports

reply ketmar <ketmar ketmar.no-ip.org> writes:
yes, it's me again. hello. this time i ported NanoVG[1] drawing 
library (only OpenGL2 backend) and OUI[2] intermediate UI 
library. they require some modules from Adam's arsd library[3] to 
work -- mostly simpledisplay for screen setup and minimal OpenGL 
bindings, and arsd.png to load png images. one can also use my 
jpeg decoder to add jpeg support.

ttf rendering powered by FreeType: feel free to take Derelict 
bindings, and change one import in "fontstash.d".

this time the things are not single-file ports, though.

have fun and happy hacking.

ah, i forgot link to ports! here they are: NanoVG and OUI[4], 
demo[5].

p.s. default dmd flags does ~35 FPS on OUI sample. but dmd -O, 
even without inlining, does solid 60 FPS.


[1] https://github.com/memononen/nanovg
[2] https://bitbucket.org/duangle/oui-blendish/overview
[3] https://github.com/adamdruppe/arsd
[4] http://repo.or.cz/iv.d.git/tree/HEAD:/nanovg
[5] http://repo.or.cz/iv.d.git/tree/HEAD:/nanovg_demo
Jun 30 2016
parent ketmar <ketmar ketmar.no-ip.org> writes:
also, i'm slowly working on Yet Another Immediage GUI Library 
based on Blendish and simplified flex box model.

for now, it can do layouting (with line wrapping, and determining 
minimal window size) and has some basic controls, like buttons, 
labels, checkboxes.

also, i changed NanoVG API a little. mostly got rid of `nvg` 
prefix for functions accepting `NVGcontext*` ('cmon, we have 
modules and UFCS in D!), and changed `NVGcontext*` arg to simply 
`NVGContext` (note capital "C").

btw, it is GPLed now. bad news for GPL haters.
Jul 04 2016