4 ms·
I think he got it wrong when he quickly ruled out IMGUI, as you can use it to create a small app with next to no dependencies. He complains that you need to red
by FraKtus 7y ago
I think he got it wrong when he quickly ruled out IMGUI, as you can use it to create a small app with next to no dependencies. He complains that you need to redraw your GUI at 60 FPS, but this is wrong, you should be able to draw with it only when needed.
I am a big fan of Nuklear. I can write a tiny C app that compiles on macOS, Windows, iOS, and Android with it. The look and feel of Nuklear can be something you don't like, however.
- ScottFree 7y ago> He complains that you need to redraw your GUI at 60 FPS, but this is wrong, you should be able to draw with it only when needed. Yep, he did that, as stated here from TFA: > The solution was to redraw only when needed: as a quick hack I introduced a global boolean doRedraw and set it to true only when an input event was received or the internal application state had been changed (e.g. the framebuffer had been updated). Then the drawing would only happen when doRedraw was set to true. Surely this could be done in a nicer way, but the general concept would be the same. His issue was this... > The second issue with text rendering was a harder nut to crack. > I really don’t want to do a Donald E. Knuth here and spend too much time on a problem that has already been solved on the OS graphics library level in a perfectly satisfactory manner. I just want to call drawText() and be done with it! How does Nuklear handle text rendering, layouts, fonts, etc?
- FraKtus 7y agoHe speaks about the 60 FPS when he tried NanoVG... I think he did not realize he could do that trick with IMGUI. For text rendering with Nuklear, you make a font atlas from a true type font, rasterizing the font is built in Nuklear with stb_truetype. That gives you a lot of freedom. You can load as many fonts as you need. There is also support to load a binary resource such as the TTF file from a base85 string; it's very handy. For layout it's immediate mode, so you describe it with code such as nk_layout_row_dynamic(ctx, (float) row_height, 3); // a row of 3 buttons if (nk_button_label(ctx, "Previous")) ... if (nk_button_label(ctx, "Next")) ... Here is small app I made with Nuklear: https://www.youtube.com/watch?v=MycIYcutlMA https://www.youtube.com/watch?v=MycIYcutlMA