We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af28689 commit f2ea556Copy full SHA for f2ea556
1 file changed
include/gz/rendering/base/BaseVisual.hh
@@ -311,8 +311,13 @@ namespace gz
311
template <class T>
312
void BaseVisual<T>::PreRender()
313
{
314
+ // T::PreRender() resolves to BaseNode<T>::PreRender(), which already
315
+ // recurses into this visual's children through the virtual
316
+ // PreRenderChildren(). Calling PreRenderChildren() a second time here
317
+ // would pre-render every child twice, compounding to O(2^depth)
318
+ // redundant visits down the scene graph. Children are therefore
319
+ // pre-rendered exactly once, via T::PreRender().
320
T::PreRender();
- this->PreRenderChildren();
321
this->PreRenderGeometries();
322
}
323
0 commit comments