You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All hardware accelerated rendering is double buffered with SDL2, which complicates matters for applications that expect to do "smart updates" on the widget level. gui.Refresh() is currently supposed to only update areas that have actually changed, returning an array of dirty rectangles. This is problematic, as we don't know if there is more than one buffer that needs to be updated.
Further, even in some windowed environments, double buffering is either implemented via page flipping, or the off-screen buffer is occasionally erased or corrupted. That is, it's never really safe to assume anything about the buffer!
Is it even possible to reliably detect whether or not gui.Refresh() needs to invalidate the whole target, or if it's safe to redraw only changed areas?
I suspect that it pretty much boils down to always repainting the full target on updates, unless you happen to know exactly what you're running on. Smart refreshing is better handled by "lightweight windows" on the windowing system level. (Currently not directly supported by SDL2, AFAIK, but should be possible to implement per-platform via SDL_CreateWindowFrom().)
The text was updated successfully, but these errors were encountered:
All hardware accelerated rendering is double buffered with SDL2, which complicates matters for applications that expect to do "smart updates" on the widget level. gui.Refresh() is currently supposed to only update areas that have actually changed, returning an array of dirty rectangles. This is problematic, as we don't know if there is more than one buffer that needs to be updated.
Further, even in some windowed environments, double buffering is either implemented via page flipping, or the off-screen buffer is occasionally erased or corrupted. That is, it's never really safe to assume anything about the buffer!
Is it even possible to reliably detect whether or not gui.Refresh() needs to invalidate the whole target, or if it's safe to redraw only changed areas?
I suspect that it pretty much boils down to always repainting the full target on updates, unless you happen to know exactly what you're running on. Smart refreshing is better handled by "lightweight windows" on the windowing system level. (Currently not directly supported by SDL2, AFAIK, but should be possible to implement per-platform via SDL_CreateWindowFrom().)
The text was updated successfully, but these errors were encountered: