Hi Philipp

On 25 January 2012 15:37, Philipp Moeller
<[email protected]> wrote:
> I'd like to back-up some osg::StateAttribute for the simple purpose of
> restoring it, if some dialog in my application is rejected.
>
> I'd would like to have something as easy as
>
> Light* light;
> ref_ptr<Light> backup = new Light(*light, 
> osg::CopyOp(osg::CopyOp::DEEP_COPY_ALL));
> //back up
> *light = *backup;
>
> This obviously does not work, as Light has no assigment
> operator.

It should work as it has a copy constructor, it doesn't need a copy
operator for this task.

You can also call clone() if you want.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to