You could also use the DescriptionList of the StateSet...

 
One of the default osgUtil::Optimizer flags is SHARE_DUPLICATE_STATE. So if two StateSets are otherwise identical and would be shared under this optimization, adding a different material code to the description list of the two StateSets would impair that optimization.
 
If he really wants to share the material codes with a pointer, then I still recommend modifying the FLT loader to use the DescriptionList (per Node) as the mechanism to return this information to the app. Once the app has the loaded model, it can run a NodeVisitor to move that information out of the DescriptionList and into shared UserData.
 
(The FLT plugin only uses UserData internally for external references, if I remember correctly, and at the root node to return geoposition information... A quick search of the code would verify this.)
  -Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to