2 ms·
It takes a bunch of effort to keep track of which nodes need to be redrawn (and in which areas of the screen). If you end up needing to redraw most (or all) of
by jmull 7y ago
It takes a bunch of effort to keep track of which nodes need to be redrawn (and in which areas of the screen).
If you end up needing to redraw most (or all) of the screen anyway, that effort is wasted. The overhead of it can even end up slowing things down.
Just assuming everything needs to be redraw from the start saves the effort, and is optimal in the case where everything does need to be redrawn.
For games in particular, this is usually a good assumption. If you're wrong, you end up slowing down less complex cases but they can usually afford it. When you're right, you're optimal for the most demanding cases. You're usually trying to hit a frame rate and care a lot more about hard cases falling below the target than how far above target easy cases are.
And there are many common cases in games where you do need to redraw everything anyway. E.g., once you start scrolling or any other kind of full-screen effect. (In the old, pre-PGU days you often actually would scroll the image in a buffer and only redraw newly the exposed area through the scene graph, but there's really not an advantage to that these days and doesn't help you with any other kind of full screen effect.)