Ah, thanks for your suggestion. The update callback does indeed work, e.g.:

class MyGeodeUpdateCallback: public osg::NodeCallback
{
public:
void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
MyGeode* myGeode = dynamic_cast<MyGeode*>(node);

if (myGeode) myGeode->updateIfDirty();
}
};

So, I suppose this is the way to go?

Cheers,
Peter

On Wed, Mar 20, 2013 at 11:15 PM, Aurelien Albert <
[email protected]> wrote:

> Hi,
>
> I think the most "standard" way to do this is to use an UpdateCallback on
> your osg::Node.
>
> This ensure your "update" code to be executed in the main application
> thread : UpdateCallbacks are executed during the update traversal, and this
> is the best way to avoid threading issues.
>
> Cheers,
> Aurelien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=53178#53178
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to