sceneUpdated() vs invalidate()

Viewed 318

What is the difference between viewer.impl.sceneUpdated() and viewer.impl.invalidate()? I’ve seen them used interchangeably all the time but haven’t been able to figure out why.

In the case of invalidate(), I have seen it used accepting 1 to 3 boolean arguments with every possible combination and it seems to give the same result every time.

1 Answers

viewer.impl.invalidate is basically:

invalidate(needsClear, needsRender, overlayDirty)
//needsClear - full render - not (currently) interruptible, runs until completion, "locks" application, needs to re-render the whole scene from start
//needRender - progressive render - show a bit more each tick, runs unless interrupted by a move, control, etc.
//overlayDirty - overlay (like rollover highlighting etc) needs to be re-rendered

And sceneUpdated(objectsMoved, skipRepaint) is basically

this.invalidate(!skipRepaint, false, !skipRepaint);

Plus the scene bounds are getting remarked for update and the shadows'd get re-rendered.

Related