14 ms·
Dear IMGUI is like the React of game dev/graphics demo UI. Shows up everywhere now
by Impossible 6y ago
Dear IMGUI is like the React of game dev/graphics demo UI. Shows up everywhere now
- cylon13 6y agoIt’s so convenient!
- app4soft 6y ago> Dear IMGUI is like the React of game dev/graphics demo UI. Shows up everywhere now I'm not saw any real example of Dear IMGUI usable under OpenGL 1.x yet.[0] SDL 1.x is much better in case for portability & wide range of platforms support.[1] (SDL2 lost a lot of platforms supported by SDL 1.x) [0] https://github.com/ocornut/imgui/issues/1006 https://github.com/ocornut/imgui/issues/1006 [1] https://twitter.com/app4soft/status/1282469039537889285 https://twitter.com/app4soft/status/1282469039537889285
- TazeTSchnitzel 6y agoOpenGL 1.x is ancient and unless you're targeting very old hardware for some retro project, you wouldn't use it, but the link you provided says it could run ImGui. Also SDL1 seems completely irrelevant?
- TeMPOraL 6y agoYup, 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_impl_opengl2.cpp 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.
- TazeTSchnitzel 6y agoBy the way, that link is broken because of a following character being parsed by HN as being part of the URL.
- TeMPOraL 6y agoThanks, 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? :).
- flohofwoe 6y agoHere'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 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 https://github.com/ocornut/imgui/issues/435
- flohofwoe 6y agoYou could write an OpenGL 1.x backend for Dear ImGui (ImGui "officially" doesn't come with any rendering backends, although the example backends can be considered "semi-offical"). All that's needed for GL 1.x is to convert the vertex- and index-data you're getting from ImGui into triangle glBegin/End call sequences. But what's the point when all relevant platforms support at least OpenGL 2.x for at least a (more like two) decade(s)?