From 2e3bf33ce6631e9f581634586b35404f11f24be8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Dec 2002 14:30:27 +0000 Subject: [PATCH] Removed the duplicate file out from the GEO plugin. Changed the osglogo to reference a jpeg instead of a tiff one. --- src/Demos/osglogo/osglogo.cpp | 2 +- src/osgPlugins/geo/ReaderWriterGEO.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Demos/osglogo/osglogo.cpp b/src/Demos/osglogo/osglogo.cpp index 8321aea45..3a55a435f 100644 --- a/src/Demos/osglogo/osglogo.cpp +++ b/src/Demos/osglogo/osglogo.cpp @@ -113,7 +113,7 @@ osg:: Node* createGlobe(const osg::BoundingBox& bb,float ratio) osg::StateSet* stateset = osgNew osg::StateSet(); - osg::Image* image = osgDB::readImageFile("land_shallow_topo_2048.tif"); + osg::Image* image = osgDB::readImageFile("land_shallow_topo_2048.jpg"); if (image) { osg::Texture2D* texture = osgNew osg::Texture2D; diff --git a/src/osgPlugins/geo/ReaderWriterGEO.cpp b/src/osgPlugins/geo/ReaderWriterGEO.cpp index 333d333f0..5ba97e063 100644 --- a/src/osgPlugins/geo/ReaderWriterGEO.cpp +++ b/src/osgPlugins/geo/ReaderWriterGEO.cpp @@ -360,7 +360,7 @@ class ReaderWriterGEO : public ReaderWriter if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED; std::ifstream fin(fileName.c_str(), std::ios::binary | std::ios::in ); - std::ofstream fdup("geodup.geo", std::ios::binary | std::ios::out ); + //std::ofstream fdup("geodup.geo", std::ios::binary | std::ios::out ); if (fin.is_open() ) { // read the input file. typedef std::vector NodeList; @@ -374,7 +374,7 @@ class ReaderWriterGEO : public ReaderWriter { georecord gr; gr.readfile(fin); - if (gr.getType() != DB_DSK_INSTANCE) gr.writefile(fdup); // create a duplicate file + //if (gr.getType() != DB_DSK_INSTANCE) gr.writefile(fdup); // create a duplicate file if (gr.getType() == DB_DSK_NORMAL_POOL) { geoField *gfff=gr.getModField(GEO_DB_NORMAL_POOL_VALUES);; gfff->uncompress();// uncompress the normals @@ -382,7 +382,7 @@ class ReaderWriterGEO : public ReaderWriter recs.push_back(gr); // add to a list of all records } fin.close(); - fdup.close(); + //fdup.close(); // now sort the records so that any record followed by a PUSh has a child set = next record, etc std::vector sorted=sort(recs); // tree-list of sorted record pointers #ifdef _DEBUG @@ -1923,3 +1923,4 @@ void internalVars::update(osg::Timer &_timer,osg::FrameStamp &_frameStamp) { // now register with Registry to instantiate the above // reader/writer. osgDB::RegisterReaderWriterProxy gReaderWriter_GEO_Proxy; +ÿÿ \ No newline at end of file