Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
1–10 of 103 posts
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#2Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#3https://floooh.github.io/sokol-html5/nuklear-sapp.html
The big difference to Dear ImGui is that Nuklear has a C API and is also implemented in C - and apparently it has more skinning/themeing options, which I haven't tinkered with yet.
TBH, for tools I prefer cimgui (a C wrapper around Dear ImGui), my impression is that Nuklear has a 'purer' immediate-mode design at the cost of some convenience, while Dear ImGui has a more pragmatic design approach, but also has less friction for writing UI code. I haven't needed skinning options so far though, that might be the actual USP of Nuklear.
It all might also just be personal bias, because I used Dear ImGui before Nuklear :)
For shits'n'giggles, here's both UI systems in the same application:
https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html
(the menu bar and all windows that open from it is Dear ImGui, the rest is Nuklear).
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#4Here's a simple WASM version of the Nuklear standard demo: https://floooh.github.io/sokol-html5/nuklear-sapp.html The big difference to Dear ImGui is that Nuklear has a C API and is also implemented in C - and apparently it has more skinning/themeing options, which I haven't tinkered with yet. TBH, for tools I prefer cimgui (a C wrapper around Dear ImGui), my impression is that Nuklear has a 'purer' immediate-mode de…
The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#5It's great to see such projects in an era of unabashed resource consumption.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#6Interesting, this seems more resource efficient than even fltk, which is the lightest usable cross-platform GUI library. And it's pure C unlike fltk. It's great to see such projects in an era of unabashed resource consumption.
https://github.com/rxi/microui
Just around 1100 lines of C code.
You need to bring your own renderer, but that's the same for Nuklear or Dear ImGui.
I wrote a WASM wrapper for the microui demo too:
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#7Here's a simple WASM version of the Nuklear standard demo: https://floooh.github.io/sokol-html5/nuklear-sapp.html The big difference to Dear ImGui is that Nuklear has a C API and is also implemented in C - and apparently it has more skinning/themeing options, which I haven't tinkered with yet. TBH, for tools I prefer cimgui (a C wrapper around Dear ImGui), my impression is that Nuklear has a 'purer' immediate-mode de…
> https://floooh.github.io/sokol-html5/nuklear-sapp-ui.html The check-box being an empty square when it's checked, and a filled square when it's unchecked is an unpopular design decision.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#8Of course, I forgot to add a frame limit so it ate up a full CPU core at first, but after fixing that, the usage was basically zero.
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#9To be honest though, I'm at the point where I'd really prefer an easy and lightweight library to setup a http and/or websocket server, and just make a ui in the browser. I've got a simple use case -- I'm just making a simple scene editor & debugging ui for a toy ray tracer.
I know there are a ton of different libraries out there for the task, but that just makes it hard to evaluate the quality of any given library. I haven't given any a shot, I've only gone so far as to look at them and ponder what the size of the user base is, and question if the project will go inactive in a couple years. Or if it's going to require me to pull in some other host of dependencies.
Recommendations from HNers welcome!
Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library
#10Interesting, this seems more resource efficient than even fltk, which is the lightest usable cross-platform GUI library. And it's pure C unlike fltk. It's great to see such projects in an era of unabashed resource consumption.
The price for the 'lightest' general UI toolkit probably goes to microui: https://github.com/rxi/microui Just around 1100 lines of C code. You need to bring your own renderer, but that's the same for Nuklear or Dear ImGui. I wrote a WASM wrapper for the microui demo too: https://floooh.github.io/sokol-html5/sgl-microui-sapp.html