Added ProxyLayer support into osgTerrain plugin

This commit is contained in:
Robert Osfield
2007-08-29 12:18:41 +00:00
parent 63c283ad03
commit 2f895b839e
5 changed files with 75 additions and 5 deletions

View File

@@ -46,15 +46,13 @@ class ReaderWriterGDAL : public osgDB::ReaderWriter
OpenThreads::ScopedLock<OpenThreads::ReentrantMutex> lock(_serializerMutex);
osg::notify(osg::NOTICE) << "GDALPlugin : " << file << std::endl;
std::string fileName = osgDB::findDataFile( file, options );
if (fileName.empty()) return ReadResult::FILE_NOT_FOUND;
initGDAL();
// open a DataSetLayer.
osg::ref_ptr<GDALPlugin::DataSetLayer> dataset = new GDALPlugin::DataSetLayer;
osg::ref_ptr<GDALPlugin::DataSetLayer> dataset = new GDALPlugin::DataSetLayer(fileName);
if (dataset->valid()) return dataset.release();