Added explicit setting of the precision to allow .osg files to be used succsefully.

This commit is contained in:
Robert Osfield
2004-11-09 16:50:02 +00:00
parent bb3d651453
commit 8f621d6ae1

View File

@@ -3893,6 +3893,9 @@ osg::Node* DataSet::decorateWithCoordinateSystemNode(osg::Node* subgraph)
void DataSet::_buildDestination(bool writeToDisk)
{
osg::ref_ptr<osgDB::ReaderWriter::Options> previous_options = osgDB::Registry::instance()->getOptions();
osgDB::Registry::instance()->setOptions(new osgDB::ReaderWriter::Options("precision 16"));
if (!_archive && !_archiveName.empty())
{
_archive = new osgDB::Archive;
@@ -3975,5 +3978,8 @@ void DataSet::_buildDestination(bool writeToDisk)
}
if (_archive.valid()) _archive->close();
osgDB::Registry::instance()->setOptions(previous_options.get());
}