Live data from Hacker News

Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

github.com

31–40 of 103 posts

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#32

This looks cool, but I don’t do a lot of GUI work. Why would one use this as opposed to Qt?

QT is a huge dependency that you have to bundle with your app. This is tiny in comparison. Also probably easier to prototype with.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#33
Related:

Nuklear: A cross-platform GUI library in C - https://news.ycombinator.com/item?id=26212787 - Feb 2021 (142 comments)

Nuklear: A single-header ANSI C GUI library - https://news.ycombinator.com/item?id=16347216 - Feb 2018 (176 comments)

Nuklear: A small ANSI C GUI toolkit - https://news.ycombinator.com/item?id=11522452 - April 2016 (92 comments)

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#34

This looks cool, but I don’t do a lot of GUI work. Why would one use this as opposed to Qt?

License issues aside the typical use case is that you want to integrate the UI with an existing 3D renderer (e.g. you have a 3D engine, and want an UI overlay for tooling and debugging). 'Bring your own renderer' UI frameworks like Nuklear or Dear ImGui are perfect for this use case. With 'traditional' UI frameworks like Qt, WPF, GTK... this is a massive PITA and even if it's possible would add an incredible amount of bloat.

...and then there's also the convenience of writing immediate mode UI code. Personally, I would never want to go back to event-/callback-/signal-driven UIs.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#35
I tend to use ImGui for testbed projects. It's flexible and quick to get up and running. I only have two minor complaints about it.

1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen.

2. Skinning is currently rather limited. (I know this has been a long requested feature).

Other than those minor gripes, I like it a lot.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#36

I tend to use ImGui for testbed projects. It's flexible and quick to get up and running. I only have two minor complaints about it. 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen. 2. Skinning is currently rather limited. (I know this has been a long requested feature). Other than those minor gripes, I like it a lot.

> 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen.

I think this would actually be fairly tricky to handle inside Dear ImGui, because the image object must be in a format that's understood by the rendering backend. The way ImGui handles image rendering via an opaque ImTextureID handle which is passed through to the renderer backend is actually quite elegant IMHO.

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#37

Here'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…

No, the biggest difference is one is only intended for development and debugging.

> Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user).

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#39
Nuklear is great. I’ve spent countless hours hacking around with it. I’ve also built a customized version for classic Macintosh systems (down to System 2.0 or so) and built some simple Macintosh software for it. I put it on GitHub here: https://github.com/CamHenlin/nuklear-quickdraw

Re: Nuklear – A single-header ANSI C immediate mode cross-platform GUI library

#40
post #31

This looks cool, but I don’t do a lot of GUI work. Why would one use this as opposed to Qt?

rapid development/prototyping

But it's faster to use a QList than having to do the same in C (repeat for all the non GUI classes that Qt brings in).
Post reply on HN