(no title)
danpla | 2 years ago
Well, if you have a traditional immediate mode API like:
if (button("Start"))
start();
Then it's not just about the API philosophy: at the very least, it ties the event handling to the drawing.danpla | 2 years ago
Well, if you have a traditional immediate mode API like:
if (button("Start"))
start();
Then it's not just about the API philosophy: at the very least, it ties the event handling to the drawing.
flohofwoe|2 years ago
Btw, the drawing doesn't happen in the button function, it just tells the UI system that there exists a button with the label "Start" in the current frame. The rendering usually happens much later after the UI system has collected the entire UI description for the frame, otherwise rendering would be very inefficient.