4 ms·
> the only concept you really need to know using an immediate mode GUI framework, is that internally to the framework it needs some mechanism to identify object
by jstimpfle 9y ago
> the only concept you really need to know using an immediate mode GUI framework, is that internally to the framework it needs some mechanism to identify objects between frames.
So why not allocate the necessary structures on the caller-side, and hand them as arguments to update and render calls? I think that's cleaner. It's the way I've started going forward for my own experiments.
I briefly looked into Dear Imgui before, and I was thinking it had quite a few hacks to find the objects from last frame. Lots of best effort guessing and workaround schemes to keep the API calls "concise".
- billsix 9y agoI think overall you and I agree quite a bit. But as far as I can tell, nuklear is designed to be simple to program the implementation, and simple to program against, at the cost of some features. https://github.com/vurtun/nuklear/issues/50 https://github.com/vurtun/nuklear/issues/50 Dear imgui may have some hacks as you mention to achieve features such as using tab to switch the active component, (I've never looked at the source), but it's still simple as can be to use. I'm not quite sure what you're advocating to do, but if you make a better graphical user interface framework than those other two projects, then I can't wait to see it.
- jstimpfle 9y agoAlways happy to find people to connect to and talk about how to actually _make_ infrastructure instead of only using it. (Maybe it's not brainy or sexy enough?) I've only begun making some UI elements. At the moment I have a keyboard-driven menu, and a slider box and an unused button with misplaced caption that react to mouse clicks. There's a lot more infrastructure I've experimented with and the UI just barely works -- but I'll soon need and work on more 2D UI functionality. One problem is that I'm not sure how to structure 2D rendering, having to deal with modern OpenGL. But I need this experience to inform my UI architecture. I will probably study vurtun a bit. So if you're interested check back in two weeks (and I'm happy to receive feedback). https://github.com/jstimpfle/learn-opengl/blob/master/ui.c https://github.com/jstimpfle/learn-opengl/blob/master/ui.c https://github.com/jstimpfle/learn-opengl/blob/master/meshview.c https://github.com/jstimpfle/learn-opengl/blob/master/meshvi...
- billsix 9y agoSounds good. I too have a 3d graphics playground app if you're interested https://github.com/billsix/hurtbox https://github.com/billsix/hurtbox