Hi Rob,

Be sure that if you’re using cloning that everything in the scene supports 
cloning.  If you have custom (non-OSG) nodekit elements in the scene, cloning 
may only be partially supported.  That can certainly cause issues with that 
approach.  Though OSG nodes supports cloning, not all custom nodekits 
necessarily implement the copy constructors properly.

- Dan



From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Robert Lockyer
Sent: Friday, March 1, 2019 7:56 AM
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
Subject: Re: [osg-users] Deep cloning an active root scene node

Thanks Robert, that's good advise for a more efficient approach in the long 
term. I just figure it might be a simple proof of concept to just blindly clone 
the whole graph. Sounds like there's no fundamental reason I can't do that, so 
probably just some silly thing I'm getting wrong.

Robert Lockyer
Software Developer
[Image removed by sender.]
Office: 1-709-701-0281
Email: 
robert.lock...@avalonholographics.com<mailto:robert.lock...@avalonholographics.com>


On Fri, Mar 1, 2019 at 8:36 AM Robert Osfield 
<robert.osfi...@gmail.com<mailto:robert.osfi...@gmail.com>> wrote:
Hi Rob,

There is a limit to how well you'll be able to get things to scale given the 
hardware limits you have to work around.  If you don't want the main rendering 
loop to wait for the rendering of all these extra views then you'll need to use 
a separate viewer(or compositeviewer) with it's own threading.  You'll need to 
manage your own frame loops in the secondary viewer.

The only reason to copy data is if it the data is being modified by the 
different threads, I wouldn't recommend avoiding any modifications of the scene 
graph so you can simply share it all without copying.  If there are 
modifications you currently need I would suggest looking at ways to move this 
work elsewhere - often you can move to the GPU and just pass a Uniform per View 
to select the settings that are approriate so the shaders can do the right 
thing.

Cheers,
Robert.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

This email and any attachments are confidential and may be privileged. Any 
unauthorized use, disclosure, copying or distribution of the information 
received is prohibited. If you are not the intended recipient please contact 
the sender immediately by return email confirming that you have and will delete 
all communications related to the email and any attachments sent to you in 
error.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to