[osg-users] Deep cloning an active root scene node
Daniel Emminizer, Code 5773
dan.emminizer at nrl.navy.mil
Fri Mar 1 05:06:02 PST 2019
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-bounces at lists.openscenegraph.org] On Behalf Of Robert Lockyer
Sent: Friday, March 1, 2019 7:56 AM
To: OpenSceneGraph Users <osg-users at 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.lockyer at avalonholographics.com<mailto:robert.lockyer at avalonholographics.com>
On Fri, Mar 1, 2019 at 8:36 AM Robert Osfield <robert.osfield at gmail.com<mailto:robert.osfield at 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 at lists.openscenegraph.org<mailto:osg-users at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190301/360f2896/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 444 bytes
Desc: image001.jpg
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190301/360f2896/attachment.jpg>
More information about the osg-users
mailing list