Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are a lot of hidden traps when rendering anything on modern operating systems that add small latencies and those small latencies add up quickly (it was much easier on old 8- and 16-bit computers).

For instance rendering something that "sticks" to the system mouse pointer and doesn't lag a few pixels behind when moving the mouse is surprisingly hard if you're rendering through a 3D API (compared to going through the native window system), at least if you also want to be energy efficient (e.g. not spam 1000 frames per second).

What strikes me as odd is describing the ImGui idea as an "ideology" when it's the most pragmatic way to describe user interfaces in a long time, for me that's the opposite of an ideology.



I think if it as Casey Muratori's "brain fart" that made sense in his context but that other developers have latched on to because of his influence in indie game circles.

I have massive respect for him, and followed everything he did back in the late '90s and early aughts, but he's quite opinionated and has some peculiar code aesthetics / trade-offs.


I first got introduced to the concept by his talk, and this implementation here - http://sol.gfxile.net/imgui/ch01.html (latest archive I could find - https://web.archive.org/web/20200428143845/http://sol.gfxile...)

I've did some translations of the above C/C++ code to lua longtime here (actually luajit, as it requires the FFI) - https://github.com/malkia/ufo/blob/master/samples/SDL/imgui/... (simplest example) through https://github.com/malkia/ufo/blob/master/samples/SDL/imgui/... though my hack for C/C++'s __LINE__ macro was

local function GEN_ID() return CURRENT_LINE() end

e.g. you basically tie the state to the... ahem.. source code line (you need really something unique). Obviously Dear ImGUI has better approaches there (use the widget's contents, like text/label contents, or add your own with ##).


Anectodal etc etc, but when I started using Dear ImGui a few years ago I had no idea about the origins of immediate mode UI, or what "immediate mode UI" even means, and neither had heard of Casey Muratori nor Omar Cornut.

All I saw was a very enjoyable way to create UIs, something I loathed before (like most other programmers I guess). So far I haven't come across another UI toolkit which is as enjoyable to use as Dear ImGui (and that includes a couple of other ImGui libraries), and that's the reason why I stick to it, not because of some sort of cult of personality ;)


    I think if it as Casey Muratori's "brain fart" that made sense in his context [...]
    I have massive respect for him, [...]
Sure doesn't sound like it. You're so dismissive of others' ideas that I don't even feel like you're looking for a constructive discussion.


Not sure why you would conclude that from what I wrote. I see myself as adding historical context + usage experience.

EDIT> I've learned a bunch from this discussion, and I haven't directly refuted much of it, just added commentary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: