ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.21k stars 10.31k forks source link

ImQuick - a single-header extension library for simplifying the render loop #4072

Open martinpetkovski opened 3 years ago

martinpetkovski commented 3 years ago

I made a small single-header extension library to move everything outside the render loop in my personal projects, so I thought I'd share it. Link here.

You write render functions for each custom (or generic) type you have, register properties of those types, assign them to custom windows and then write a single line of code which simply renders everything as specified in a single line of code. The library is purely conceptual, so unfortunately I don't have any images or gifs to show :) Any feedback is appreciated.

ocornut commented 3 years ago

Hello Martin,

Thanks for posting this. I've added it to https://github.com/ocornut/imgui/wiki/Useful-Widgets But finding it hard to give it a proper description, ihmo "simplifying the render loop" is quite unclear and not representative of what "Render" means in Dear ImGui land. At heart your system seems closer to being a typing/serialization system coupled with a retained layer to hold on instances?

martinpetkovski commented 3 years ago

Yeah it's kind of difficult to pin down in simple terms, so I went with what was most descriptive and easy to understand at first glance (although I might be wrong!). I'll try to make it more descriptive when I have time, thanks a lot!