4 ms·
I think the default behavior is to only re-render if the window is active/focused. You can trigger a render at specific points, including in the main loop, whic
by the__alchemist 1y ago
I think the default behavior is to only re-render if the window is active/focused. You can trigger a render at specific points, including in the main loop, which will result in the behavior you mention.
This can be problematic, e.g. some of the sensor interfaces I have, I want to always display correct data, even if not focused. So, I have to decide if I want to have old data shown in the background misleading users, or have a per penalty from constant renders. Or try something else to be clever. (Maybe have it update at a low rate if not focused? I think that's the move...)
- andsoitis 1y ago> You can trigger a render at specific points, including in the main loop, which will result in the behavior you mention. sounds analogous to manual memory management
- hoppp 1y agoWhich is completely fine. There are bugs but unlike with memory management, render bugs are more in your face.
- andsoitis 1y agowhich is why, I think, it is better to not have to do that manual rendering gymnastics when retained mode does it for you.
- mort96 1y agoLet's not pretend that retained mode is somehow easy. Procedurally changing the system's state in response to events gets pretty complex. A philosophy which approximates the II as a function of state is tempting, in a lot of ways. As someone with a fair amount of experience of both retained mode and immediate mode UIs, I can't confidently say that retained mode requires less "mental gymnastics" than immediate mode.
- mort96 1y agoBreaking: software development require developers to understand what the system does, more at 11