Why am I using X3DRootNode.AddChildren(Shape); Its interior will release all the nodes and redraw them all again. I want to add only one shape to the X3DRootNode and its repeated releases of all the nodes will also consume CPU time

code:
Shape: TShapeNode;

X3DRootNode.AddChildren(Shape);

  • And by the way I’m doing this after the scene has been loaded when I’m using X3DRootNode.AddChildren(Shape) it’s going to happen and every time I call AddChildren it’s going to loop through it all over again

Indeed, that is just our TODO.

The X3DGroupingNode.AddChildren is not optimal at this point to add things to loaded scenes.

We want to improve it, in the meantime one thing you can do is instead add additional things as new TCastleScene instances. Adding a new TCastleScene instance, with new shapes, doesn’t “touch” the previous scene.