From Marco, updates to osgDB and .osg plugin to better handle reading of

objects of specified types.
This commit is contained in:
Robert Osfield
2003-07-21 18:36:47 +00:00
parent 40e38a1645
commit aa8b552ca6
10 changed files with 66 additions and 34 deletions

View File

@@ -35,15 +35,11 @@ bool Drawable_readLocalData(Object& obj, Input& fr)
iteratorAdvanced = true;
}
ref_ptr<Object> readObject = fr.readObject();
if (readObject.valid())
{
osg::Shape* shape = dynamic_cast<osg::Shape*>(readObject.get());
if (shape) drawable.setShape(shape);
else notify(WARN)<<"Warning:: "<<readObject->className()<<" loaded but cannot not be attached to Drawable."<<std::endl;
iteratorAdvanced = true;
}
Shape* shape = static_cast<Shape *>(fr.readObjectOfType(type_wrapper<Shape>()));
if (shape) {
drawable.setShape(shape);
iteratorAdvanced = true;
}
if (fr[0].matchWord("supportsDisplayList"))
{