Re:Nuklear: A small ANSI C GUI toolkit
by generic_user on Monday April 18, 2016 @11:38PM
(#11524713)
This looks quite nice. But they did fib a bit about no dependencies. It is apparently built on top of GLFW3 which is a nice, small C library that gives you a native window and input handling.
[ Parent
| on HN ]
Nope, it isn't. GLFW3 is in example use of library.
There is not a single instance of string "glf" in actual library. The library claims that it is agnostic to what actual low level layer you provide to it so you can use it with what ever you choose as render target and what ever you choose as input source. Its user of library's task to provide those two and link to GUI.
There's also a pure X11 version, which only pulls in what X requires:
$ make
gcc main.c -std=c89 -pedantic -O2 -D_POSIX_C_SOURCE=200809L -o bin/zahnrad -lX11 -lm
$ ldd bin/zahnrad
linux-vdso.so.1 (0x00007ffe32df9000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f8468746000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f8468441000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f84680a0000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f8467e7d000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8467c79000)
/lib64/ld-linux-x86-64.so.2 (0x00007f8468a88000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f8467a75000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f846786f000)
Re:Nuklear: A small ANSI C GUI toolkit
by generic_user on Tuesday April 19, 2016 @12:33AM
(#11524890)
Cross platform is a key feature. Thats why glfw is so nice. Unless you want to write the grungy windows bits for all your platforms I don't see any problem with useing glfw. Its a solid library.
GLFW is great, but it's limited to GL or Vulkan as 3D backend. There's a context-less mode now (created for Vulkan I think), but I haven't seen GLFW used together with D3D or Metal yet. It's fairly easy to rip the relevant window- and input-handling code out though.