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

The widget should keep its state private.

ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));

ImGui::SliderFloat("float", &f, 0.0f, 1.0f);

And maybe is a C++ lib but the interface is C with namespaces. Odd.



Immediate mode is a stateless design pattern.


The way I understand it, the idea is that widgets don't own the state. They are sort of stateless. Your app owns the state.


Exactly, the app owning (most of) the state is precisely the point of ImGui.


Public interface with C makes sense. C++ doesn't have portable ABI plus it makes porting harder.




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

Search: