Hi
For those of you who know what IMGUI is, you know that it can be implemented as is or defferred.
That is, you call a "DoButton" which will draw the button and return true if it was clicked such that you can if(DoButton){logic}.
Now, since this implementation requires that you actually draw the button where you call this function, the IMGUI class would have to carry with it a render texture and a pointer to the device.
How would it impact performance to render let's say 100 GUI widgets all throughout the application? This means a drawcall scattered around in a 100 places.
Another option, defferred rendering requires you to save alot of widget information which will be drawn later together. This sort of undermines the IMGUI concept aswell. Is this something to consider?
Lastly I have a question regarding passing the GUI interface around in code with IMGUI. Since you need to be able to draw a widget from any part of the code, what implementation should I go for? Should the GUI class have a global instance? Singleton? Or just pass the GUI interface to every function in the code?