Hi,
i have encountered some similiar problems with multithreading (and the
datavariance stuff).

One thing I have considered is changing the design of osg::Statesets and
osg::StateAttribute to immutable classes. So once the stuff is created
you can only change it by cloning it. At least for those objects you
don't have to think about datavariance anymore.

Attached you will find a 'setup' design pattern, which helps you
spawning immutable objects.

Richard
PS.: Just an idea.

Attachment: TestClass.cpp
Description: TestClass.cpp

Attachment: TestClass.h
Description: TestClass.h

Attachment: Test.cpp
Description: Test.cpp

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

Reply via email to