Changeset 949
- Timestamp:
- 10/14/08 21:21:36
- Files:
-
- trunk/TODO.txt (modified) (1 diff)
- trunk/include/vpb/BuildOptions (modified) (2 diffs)
- trunk/src/vpb/BuildOptions.cpp (modified) (2 diffs)
- trunk/src/vpb/BuildOptionsIO.cpp (modified) (1 diff)
- trunk/src/vpb/Commandline.cpp (modified) (1 diff)
- trunk/src/vpb/Destination.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/TODO.txt
r741 r949 3 3 Already completed: 4 4 1) Added vpbmaster better cancellation. 5 2) Progress reporting with estimated time to completion. 6 3) Better split level estimation 5 7 4) Incremental build - i.e. ability to rerun from an existing tasks file. 8 5) Automatic set up of reprojection task if required. 6 9 6) Handling of ten of thousands of input files (i.e. will currently break the number of permissable open file handles.) 7 10 8 11 Items left to do: 9 2) Progress reporting with estimated time to completion.10 3) Better split level estimation11 5) Automatic set up of reprojection task if required.12 12 7) Write up on the VPB wiki website about use of distributed/incremental build. trunk/include/vpb/BuildOptions
r940 r949 63 63 void setDestinationImageExtension(const std::string& extension) { _imageExtension = extension; } 64 64 const std::string& getDestinationImageExtension() const { return _imageExtension; } 65 66 void setPowerOfTwoImages(bool powerOfTwoImages) { _powerOfTwoImages = powerOfTwoImages; } 67 bool getPowerOfTwoImages() const { return _powerOfTwoImages; } 65 68 66 69 /** Set the Archive name if one is to be used.*/ … … 339 342 bool _outputTaskDirectories; 340 343 std::string _imageExtension; 344 bool _powerOfTwoImages; 341 345 std::string _intermediateBuildName; 342 346 std::string _logFileName; trunk/src/vpb/BuildOptions.cpp
r937 r949 40 40 _geometryType = POLYGONAL; 41 41 _imageExtension = ".dds"; 42 _powerOfTwoImages = true; 42 43 _intermediateBuildName = ""; 43 44 _logFileName = ""; … … 121 122 _geometryType = rhs._geometryType; 122 123 _imageExtension = rhs._imageExtension; 124 _powerOfTwoImages = rhs._powerOfTwoImages; 123 125 _intermediateBuildName = rhs._intermediateBuildName; 124 126 _logFileName = rhs._logFileName; trunk/src/vpb/BuildOptionsIO.cpp
r941 r949 245 245 ADD_STRING_PROPERTY(DestinationTileExtension); 246 246 ADD_STRING_PROPERTY(DestinationImageExtension); 247 ADD_BOOL_PROPERTY(PowerOfTwoImages); 247 248 ADD_STRING_PROPERTY(ArchiveName); 248 249 ADD_STRING_PROPERTY(IntermediateBuildName); trunk/src/vpb/Commandline.cpp
r944 r949 793 793 } 794 794 795 while (arguments.read("--npot")) { buildOptions->setPowerOfTwoImages(false); } 796 while (arguments.read("--pot")) { buildOptions->setPowerOfTwoImages(true); } 797 795 798 while (arguments.read("--height-attribute",heightAttributeName)) {} 796 799 trunk/src/vpb/Destination.cpp
r946 r949 248 248 unsigned int numRowsRequired = osg::minimum(_image_maxNumRows,numRowsAtFullRes); 249 249 250 // use a minimum image size of 4x4 to avoid mipmap generation problems in OpenGL at sizes at 2x2. 251 numColumns = 4; 252 numRows = 4; 253 254 // round to nearest power of two above or equal to the required resolution 255 while (numColumns<numColumnsRequired) numColumns *= 2; 256 while (numRows<numRowsRequired) numRows *= 2; 257 250 251 if (_dataSet->getPowerOfTwoImages()) 252 { 253 // use a minimum image size of 4x4 to avoid mipmap generation problems in OpenGL at sizes at 2x2. 254 numColumns = 4; 255 numRows = 4; 256 257 // round to nearest power of two above or equal to the required resolution 258 while (numColumns<numColumnsRequired) numColumns *= 2; 259 while (numRows<numRowsRequired) numRows *= 2; 260 } 261 else 262 { 263 numColumns = osg::maximum(4u, numColumnsRequired); 264 numRows = osg::maximum(4u, numRowsRequired); 265 266 if (_dataSet->getDestinationImageExtension()==".dds") 267 { 268 // when doing compressed textures make sure that it's an multiple of four 269 if ((numColumns % 4)!=0) numColumns = ((numColumns>>2)<<2)+4; 270 if ((numRows % 4)!=0) numRows = ((numRows>>2)<<2)+4; 271 } 272 273 osg::notify(osg::NOTICE)<<"numColumnsAtFullRes = "<<numColumnsRequired<<"\tnumColumns = "<< numColumns<<std::endl; 274 osg::notify(osg::NOTICE)<<"numRowsAtFullRes = "<<numRowsRequired<<"\tnumRows = "<< numRows<<std::endl; 275 } 276 258 277 // set up properly for vector and raster (previously always vector) 259 278 // assume raster if _dataType not set (default for Destination Tile) … … 1215 1234 if (_dataSet->getMipMappingMode()==DataSet::MIP_MAPPING_HARDWARE) 1216 1235 texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); 1236 1237 // make sure the OSG doesn't rescale images if it doesn't need to. 1238 texture->setResizeNonPowerOfTwoHint(_dataSet->getPowerOfTwoImages()); 1239 1217 1240 1218 1241 // get OpenGL driver to create texture from image.
