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

Yup, it seems it could work for both SDL1 and OpenGL 1.x, it's just a matter of writing a custom backend. Per README:

"Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/keyboard/gamepad inputs 2) uploading one texture to your GPU/render engine 3) providing a render function that can bind textures and render textured triangles."

The backends don't seem all that complicated. Here's the OpenGL 2 implementation: https://github.com/ocornut/imgui/blob/master/backends/imgui_... - should be backportable to OpenGL 1.x.

I'm pretty sure that if someone was crazy enough, they could even write a ncurses backend for it. Rejecting 50% of the functionality for sure, but most of the UIs I've seen done with Dear ImGui were simple enough that they could be translated to terminal display almost 1:1.

I actually love this kind of design, where the dependency on IO particulars is neatly separated out. I don't see much in terms of automated testing in the repo, but I imagine feature-level tests should be easy to add with such design: just have a backend that lets the test drive input, and consume callbacks and rendering commands.



Here's an experimental text-mode backend for Dear ImGui based on ncurses (not sure if this required deeper changes to Dear ImGui though):

https://github.com/ggerganov/imtui

Also, regarding automated testing, AFAIK this is in progress for quite a while:

https://github.com/ocornut/imgui/issues/435


By the way, that link is broken because of a following character being parsed by HN as being part of the URL.


Thanks, fixed.

@dang, is there any reason URL parser should consider a trailing semicolon to be a part of the URL? Or maybe HN needs some form of minimal markup or escaping syntax for URLs? Or at least a documentation of the existing parser? :).




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

Search: