Skip to content

How to safely remove node from the scene? #1273

Closed Answered by robertosfield
jacky-wang7 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Jacky,

The pseudo code you posted suggests you've wrapped the vsg::Viewer, or that your code segment is just written up loosely from memory and doesn't match the original code - I say this because vsg::Viewer doesn't have a render() method so this leaves us wondering what is going on behind the scenes.

The second observation is that you are calling viewer.compile() in your rendering loop, this is a bad practice. None of the examples use this approach, they only ever call viewer.compile() prior to running the main loop. I would encourage you to follow the examples as a guide on how to lay things out.

If you wish to do compilation of new scene graphs added during the running of the appli…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jacky-wang7
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants