Changeset 11043 for OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp
- Timestamp:
- 02/09/10 19:24:37 (3 years ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp (modified) (62 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp
r10764 r11043 156 156 if (options & TESSELLATE_GEOMETRY) 157 157 { 158 osg::notify(osg::INFO)<<"Optimizer::optimize() doing TESSELLATE_GEOMETRY"<<std::endl;158 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing TESSELLATE_GEOMETRY"<<std::endl; 159 159 160 160 TessellateVisitor tsv; … … 164 164 if (options & REMOVE_LOADED_PROXY_NODES) 165 165 { 166 osg::notify(osg::INFO)<<"Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES"<<std::endl;166 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES"<<std::endl; 167 167 168 168 RemoveLoadedProxyNodesVisitor rlpnv(this); … … 174 174 if (options & COMBINE_ADJACENT_LODS) 175 175 { 176 osg::notify(osg::INFO)<<"Optimizer::optimize() doing COMBINE_ADJACENT_LODS"<<std::endl;176 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing COMBINE_ADJACENT_LODS"<<std::endl; 177 177 178 178 CombineLODsVisitor clv(this); … … 183 183 if (options & OPTIMIZE_TEXTURE_SETTINGS) 184 184 { 185 osg::notify(osg::INFO)<<"Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS"<<std::endl;185 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS"<<std::endl; 186 186 187 187 TextureVisitor tv(true,true, // unref image … … 194 194 if (options & SHARE_DUPLICATE_STATE) 195 195 { 196 osg::notify(osg::INFO)<<"Optimizer::optimize() doing SHARE_DUPLICATE_STATE"<<std::endl;196 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing SHARE_DUPLICATE_STATE"<<std::endl; 197 197 198 198 bool combineDynamicState = false; … … 207 207 if (options & TEXTURE_ATLAS_BUILDER) 208 208 { 209 osg::notify(osg::INFO)<<"Optimizer::optimize() doing TEXTURE_ATLAS_BUILDER"<<std::endl;209 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing TEXTURE_ATLAS_BUILDER"<<std::endl; 210 210 211 211 // traverse the scene collecting textures into texture atlas. … … 226 226 if (options & COPY_SHARED_NODES) 227 227 { 228 osg::notify(osg::INFO)<<"Optimizer::optimize() doing COPY_SHARED_NODES"<<std::endl;228 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing COPY_SHARED_NODES"<<std::endl; 229 229 230 230 CopySharedSubgraphsVisitor cssv(this); … … 235 235 if (options & FLATTEN_STATIC_TRANSFORMS) 236 236 { 237 osg::notify(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS"<<std::endl;237 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS"<<std::endl; 238 238 239 239 int i=0; … … 241 241 do 242 242 { 243 osg::notify(osg::DEBUG_INFO) << "** RemoveStaticTransformsVisitor *** Pass "<<i<<std::endl;243 NOTIFY(osg::DEBUG_INFO) << "** RemoveStaticTransformsVisitor *** Pass "<<i<<std::endl; 244 244 FlattenStaticTransformsVisitor fstv(this); 245 245 node->accept(fstv); … … 256 256 if (options & FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS) 257 257 { 258 osg::notify(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<<std::endl;258 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<<std::endl; 259 259 260 260 // no combine any adjacent static transforms. … … 266 266 if (options & MERGE_GEODES) 267 267 { 268 osg::notify(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEODES"<<std::endl;268 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEODES"<<std::endl; 269 269 270 270 osg::Timer_t startTick = osg::Timer::instance()->tick(); … … 275 275 osg::Timer_t endTick = osg::Timer::instance()->tick(); 276 276 277 osg::notify(osg::INFO)<<"MERGE_GEODES took "<<osg::Timer::instance()->delta_s(startTick,endTick)<<std::endl;277 NOTIFY(osg::INFO)<<"MERGE_GEODES took "<<osg::Timer::instance()->delta_s(startTick,endTick)<<std::endl; 278 278 } 279 279 280 280 if (options & CHECK_GEOMETRY) 281 281 { 282 osg::notify(osg::INFO)<<"Optimizer::optimize() doing CHECK_GEOMETRY"<<std::endl;282 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing CHECK_GEOMETRY"<<std::endl; 283 283 284 284 CheckGeometryVisitor mgv(this); … … 288 288 if (options & MAKE_FAST_GEOMETRY) 289 289 { 290 osg::notify(osg::INFO)<<"Optimizer::optimize() doing MAKE_FAST_GEOMETRY"<<std::endl;290 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MAKE_FAST_GEOMETRY"<<std::endl; 291 291 292 292 MakeFastGeometryVisitor mgv(this); … … 296 296 if (options & MERGE_GEOMETRY) 297 297 { 298 osg::notify(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEOMETRY"<<std::endl;298 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing MERGE_GEOMETRY"<<std::endl; 299 299 300 300 osg::Timer_t startTick = osg::Timer::instance()->tick(); … … 306 306 osg::Timer_t endTick = osg::Timer::instance()->tick(); 307 307 308 osg::notify(osg::INFO)<<"MERGE_GEOMETRY took "<<osg::Timer::instance()->delta_s(startTick,endTick)<<std::endl;308 NOTIFY(osg::INFO)<<"MERGE_GEOMETRY took "<<osg::Timer::instance()->delta_s(startTick,endTick)<<std::endl; 309 309 } 310 310 311 311 if (options & TRISTRIP_GEOMETRY) 312 312 { 313 osg::notify(osg::INFO)<<"Optimizer::optimize() doing TRISTRIP_GEOMETRY"<<std::endl;313 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing TRISTRIP_GEOMETRY"<<std::endl; 314 314 315 315 TriStripVisitor tsv(this); … … 320 320 if (options & REMOVE_REDUNDANT_NODES) 321 321 { 322 osg::notify(osg::INFO)<<"Optimizer::optimize() doing REMOVE_REDUNDANT_NODES"<<std::endl;322 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing REMOVE_REDUNDANT_NODES"<<std::endl; 323 323 324 324 RemoveEmptyNodesVisitor renv(this); … … 341 341 if (options & SPATIALIZE_GROUPS) 342 342 { 343 osg::notify(osg::INFO)<<"Optimizer::optimize() doing SPATIALIZE_GROUPS"<<std::endl;343 NOTIFY(osg::INFO)<<"Optimizer::optimize() doing SPATIALIZE_GROUPS"<<std::endl; 344 344 345 345 SpatializeGroupsVisitor sv(this); … … 459 459 void Optimizer::StateVisitor::optimize() 460 460 { 461 osg::notify(osg::INFO) << "Num of StateSet="<<_statesets.size()<< std::endl;461 NOTIFY(osg::INFO) << "Num of StateSet="<<_statesets.size()<< std::endl; 462 462 463 463 { … … 540 540 std::sort(attributeList.begin(),attributeList.end(),LessDerefFunctor<osg::StateAttribute>()); 541 541 542 osg::notify(osg::INFO) << "state attribute list"<< std::endl;542 NOTIFY(osg::INFO) << "state attribute list"<< std::endl; 543 543 for(AttributeList::iterator aaitr = attributeList.begin(); 544 544 aaitr!=attributeList.end(); 545 545 ++aaitr) 546 546 { 547 osg::notify(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl;548 } 549 550 osg::notify(osg::INFO) << "searching for duplicate attributes"<< std::endl;547 NOTIFY(osg::INFO) << " "<<*aaitr << " "<<(*aaitr)->className()<< std::endl; 548 } 549 550 NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; 551 551 // find the duplicates. 552 552 AttributeList::iterator first_unique = attributeList.begin(); … … 557 557 if (**current==**first_unique) 558 558 { 559 osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl;559 NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; 560 560 StateSetList& statesetlist = attributeToStateSetMap[*current]; 561 561 for(StateSetList::iterator sitr=statesetlist.begin(); … … 563 563 ++sitr) 564 564 { 565 osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl;565 NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; 566 566 osg::StateSet* stateset = sitr->first; 567 567 unsigned int unit = sitr->second; … … 592 592 std::sort(uniformList.begin(),uniformList.end(),LessDerefFunctor<osg::Uniform>()); 593 593 594 osg::notify(osg::INFO) << "state uniform list"<< std::endl;594 NOTIFY(osg::INFO) << "state uniform list"<< std::endl; 595 595 for(UniformList::iterator uuitr = uniformList.begin(); 596 596 uuitr!=uniformList.end(); 597 597 ++uuitr) 598 598 { 599 osg::notify(osg::INFO) << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl;600 } 601 602 osg::notify(osg::INFO) << "searching for duplicate uniforms"<< std::endl;599 NOTIFY(osg::INFO) << " "<<*uuitr << " "<<(*uuitr)->getName()<< std::endl; 600 } 601 602 NOTIFY(osg::INFO) << "searching for duplicate uniforms"<< std::endl; 603 603 // find the duplicates. 604 604 UniformList::iterator first_unique_uniform = uniformList.begin(); … … 609 609 if ((**current_uniform)==(**first_unique_uniform)) 610 610 { 611 osg::notify(osg::INFO) << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl;611 NOTIFY(osg::INFO) << " found duplicate uniform "<<(*current_uniform)->getName()<<" first_unique_uniform="<<*first_unique_uniform<<" current_uniform="<<*current_uniform<< std::endl; 612 612 StateSetSet& statesetset = uniformToStateSetMap[*current_uniform]; 613 613 for(StateSetSet::iterator sitr=statesetset.begin(); … … 615 615 ++sitr) 616 616 { 617 osg::notify(osg::INFO) << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl;617 NOTIFY(osg::INFO) << " replace duplicate "<<*current_uniform<<" with "<<*first_unique_uniform<< std::endl; 618 618 osg::StateSet* stateset = *sitr; 619 619 stateset->addUniform(*first_unique_uniform); … … 645 645 std::sort(statesetSortList.begin(),statesetSortList.end(),LessDerefFunctor<osg::StateSet>()); 646 646 647 osg::notify(osg::INFO) << "searching for duplicate attributes"<< std::endl;647 NOTIFY(osg::INFO) << "searching for duplicate attributes"<< std::endl; 648 648 // find the duplicates. 649 649 StateSetSortList::iterator first_unique = statesetSortList.begin(); … … 653 653 if (**current==**first_unique) 654 654 { 655 osg::notify(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl;655 NOTIFY(osg::INFO) << " found duplicate "<<(*current)->className()<<" first="<<*first_unique<<" current="<<*current<< std::endl; 656 656 ObjectSet& objSet = _statesets[*current]; 657 657 for(ObjectSet::iterator sitr=objSet.begin(); … … 659 659 ++sitr) 660 660 { 661 osg::notify(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl;661 NOTIFY(osg::INFO) << " replace duplicate "<<*current<<" with "<<*first_unique<< std::endl; 662 662 osg::Object* obj = *sitr; 663 663 osg::Drawable* drawable = dynamic_cast<osg::Drawable*>(obj); … … 1105 1105 else 1106 1106 { 1107 osg::notify(osg::WARN)<<"Warning:: during Optimize::CollectLowestTransformsVisitor::removeTransforms(Node*)"<<std::endl;1108 osg::notify(osg::WARN)<<" unhandled of setting of indentity matrix on "<< titr->first->className()<<std::endl;1109 osg::notify(osg::WARN)<<" model will appear in the incorrect position."<<std::endl;1107 NOTIFY(osg::WARN)<<"Warning:: during Optimize::CollectLowestTransformsVisitor::removeTransforms(Node*)"<<std::endl; 1108 NOTIFY(osg::WARN)<<" unhandled of setting of indentity matrix on "<< titr->first->className()<<std::endl; 1109 NOTIFY(osg::WARN)<<" model will appear in the incorrect position."<<std::endl; 1110 1110 } 1111 1111 } … … 1444 1444 else 1445 1445 { 1446 osg::notify(osg::WARN)<<"Optimizer::RemoveRedundantNodesVisitor::removeRedundantNodes() - failed dynamic_cast"<<std::endl;1446 NOTIFY(osg::WARN)<<"Optimizer::RemoveRedundantNodesVisitor::removeRedundantNodes() - failed dynamic_cast"<<std::endl; 1447 1447 } 1448 1448 } … … 1525 1525 else 1526 1526 { 1527 osg::notify(osg::WARN)<<"Optimizer::RemoveLoadedProxyNodesVisitor::removeRedundantNodes() - failed dynamic_cast"<<std::endl;1527 NOTIFY(osg::WARN)<<"Optimizer::RemoveLoadedProxyNodesVisitor::removeRedundantNodes() - failed dynamic_cast"<<std::endl; 1528 1528 } 1529 1529 } … … 1826 1826 { 1827 1827 1828 // osg::notify(osg::NOTICE)<<"Before "<<geode.getNumDrawables()<<std::endl;1828 // NOTIFY(osg::NOTICE)<<"Before "<<geode.getNumDrawables()<<std::endl; 1829 1829 1830 1830 typedef std::vector<osg::Geometry*> DuplicateList; … … 1995 1995 1996 1996 static int co = 0; 1997 osg::notify(osg::INFO)<<"merged and removed Geometry "<<++co<<std::endl;1997 NOTIFY(osg::INFO)<<"merged and removed Geometry "<<++co<<std::endl; 1998 1998 } 1999 1999 } … … 2002 2002 #endif 2003 2003 2004 // osg::notify(osg::NOTICE)<<"After "<<geode.getNumDrawables()<<std::endl;2004 // NOTIFY(osg::NOTICE)<<"After "<<geode.getNumDrawables()<<std::endl; 2005 2005 2006 2006 } … … 2282 2282 } 2283 2283 2284 virtual void apply(osg::Array&) { osg::notify(osg::WARN) << "Warning: Optimizer's MergeArrayVisitor cannot merge Array type." << std::endl; }2284 virtual void apply(osg::Array&) { NOTIFY(osg::WARN) << "Warning: Optimizer's MergeArrayVisitor cannot merge Array type." << std::endl; } 2285 2285 2286 2286 virtual void apply(osg::ByteArray& rhs) { if (_offset) _mergeAndOffset(rhs); else _merge(rhs); } … … 2643 2643 bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; 2644 2644 2645 osg::notify(osg::INFO)<<"Dividing "<<group->className()<<" num children = "<<group->getNumChildren()<<" xAxis="<<xAxis<<" yAxis="<<yAxis<<" zAxis="<<zAxis<<std::endl;2645 NOTIFY(osg::INFO)<<"Dividing "<<group->className()<<" num children = "<<group->getNumChildren()<<" xAxis="<<xAxis<<" yAxis="<<yAxis<<" zAxis="<<zAxis<<std::endl; 2646 2646 2647 2647 if (!xAxis && !yAxis && !zAxis) 2648 2648 { 2649 osg::notify(osg::INFO)<<" No axis to divide, stopping division."<<std::endl;2649 NOTIFY(osg::INFO)<<" No axis to divide, stopping division."<<std::endl; 2650 2650 return false; 2651 2651 } … … 2811 2811 bool zAxis = (bb.zMax()-bb.zMin())>divide_distance; 2812 2812 2813 osg::notify(osg::INFO)<<"INFO "<<geode->className()<<" num drawables = "<<geode->getNumDrawables()<<" xAxis="<<xAxis<<" yAxis="<<yAxis<<" zAxis="<<zAxis<<std::endl;2813 NOTIFY(osg::INFO)<<"INFO "<<geode->className()<<" num drawables = "<<geode->getNumDrawables()<<" xAxis="<<xAxis<<" yAxis="<<yAxis<<" zAxis="<<zAxis<<std::endl; 2814 2814 2815 2815 if (!xAxis && !yAxis && !zAxis) 2816 2816 { 2817 osg::notify(osg::INFO)<<" No axis to divide, stopping division."<<std::endl;2817 NOTIFY(osg::INFO)<<" No axis to divide, stopping division."<<std::endl; 2818 2818 return false; 2819 2819 } … … 2822 2822 if (parents.empty()) 2823 2823 { 2824 osg::notify(osg::INFO)<<" Cannot perform spatialize on root Geode, add a Group above it to allow subdivision."<<std::endl;2824 NOTIFY(osg::INFO)<<" Cannot perform spatialize on root Geode, add a Group above it to allow subdivision."<<std::endl; 2825 2825 return false; 2826 2826 } … … 2867 2867 void Optimizer::CopySharedSubgraphsVisitor::copySharedNodes() 2868 2868 { 2869 osg::notify(osg::INFO)<<"Shared node "<<_sharedNodeList.size()<<std::endl;2869 NOTIFY(osg::INFO)<<"Shared node "<<_sharedNodeList.size()<<std::endl; 2870 2870 for(SharedNodeList::iterator itr=_sharedNodeList.begin(); 2871 2871 itr!=_sharedNodeList.end(); 2872 2872 ++itr) 2873 2873 { 2874 osg::notify(osg::INFO)<<" No parents "<<(*itr)->getNumParents()<<std::endl;2874 NOTIFY(osg::INFO)<<" No parents "<<(*itr)->getNumParents()<<std::endl; 2875 2875 osg::Node* node = *itr; 2876 2876 for(unsigned int i=node->getNumParents()-1;i>0;--i) … … 3039 3039 if (geodeDuplicateMap.empty()) return false; 3040 3040 3041 osg::notify(osg::INFO)<<"mergeGeodes in group '"<<group.getName()<<"' "<<geodeDuplicateMap.size()<<std::endl;3041 NOTIFY(osg::INFO)<<"mergeGeodes in group '"<<group.getName()<<"' "<<geodeDuplicateMap.size()<<std::endl; 3042 3042 3043 3043 // merge … … 3246 3246 ++aitr) 3247 3247 { 3248 osg::notify(osg::INFO)<<"checking source "<<source->_image->getFileName()<<" to see it it'll fit in atlas "<<aitr->get()<<std::endl;3248 NOTIFY(osg::INFO)<<"checking source "<<source->_image->getFileName()<<" to see it it'll fit in atlas "<<aitr->get()<<std::endl; 3249 3249 if ((*aitr)->doesSourceFit(source)) 3250 3250 { … … 3254 3254 else 3255 3255 { 3256 osg::notify(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<aitr->get()<<std::endl;3256 NOTIFY(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<aitr->get()<<std::endl; 3257 3257 } 3258 3258 } … … 3260 3260 if (!addedSourceToAtlas) 3261 3261 { 3262 osg::notify(osg::INFO)<<"creating new Atlas for "<<source->_image->getFileName()<<std::endl;3262 NOTIFY(osg::INFO)<<"creating new Atlas for "<<source->_image->getFileName()<<std::endl; 3263 3263 3264 3264 osg::ref_ptr<Atlas> atlas = new Atlas(_maximumAtlasWidth,_maximumAtlasHeight,_margin); … … 3579 3579 { 3580 3580 // yes it fits :-) 3581 osg::notify(osg::INFO)<<"Fits in current row"<<std::endl;3581 NOTIFY(osg::INFO)<<"Fits in current row"<<std::endl; 3582 3582 return true; 3583 3583 } … … 3587 3587 { 3588 3588 // yes it fits :-) 3589 osg::notify(osg::INFO)<<"Fits in next row"<<std::endl;3589 NOTIFY(osg::INFO)<<"Fits in next row"<<std::endl; 3590 3590 return true; 3591 3591 } … … 3600 3600 if (!doesSourceFit(source)) 3601 3601 { 3602 osg::notify(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<this<<std::endl;3602 NOTIFY(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<this<<std::endl; 3603 3603 return false; 3604 3604 } … … 3644 3644 _sourceList.push_back(source); 3645 3645 3646 osg::notify(osg::INFO)<<"current row insertion, source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl;3646 NOTIFY(osg::INFO)<<"current row insertion, source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl; 3647 3647 3648 3648 // set up the source so it knows where it is in the atlas … … 3672 3672 _sourceList.push_back(source); 3673 3673 3674 osg::notify(osg::INFO)<<"next row insertion, source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl;3674 NOTIFY(osg::INFO)<<"next row insertion, source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl; 3675 3675 3676 3676 // set up the source so it knows where it is in the atlas … … 3686 3686 _height = _y + sourceImage->t() + 2*_margin; 3687 3687 3688 osg::notify(osg::INFO)<<"source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl;3688 NOTIFY(osg::INFO)<<"source "<<source->_image->getFileName()<<" "<<_x<<","<<_y<<" fits in row of atlas "<<this<<std::endl; 3689 3689 3690 3690 return true; 3691 3691 } 3692 3692 3693 osg::notify(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<this<<std::endl;3693 NOTIFY(osg::INFO)<<"source "<<source->_image->getFileName()<<" does not fit in atlas "<<this<<std::endl; 3694 3694 3695 3695 // shouldn't get here, unless doesSourceFit isn't working... … … 3705 3705 while (h<_height) h *= 2; 3706 3706 3707 osg::notify(osg::INFO)<<"Clamping "<<_width<<", "<<_height<<" to "<<w<<","<<h<<std::endl;3707 NOTIFY(osg::INFO)<<"Clamping "<<_width<<", "<<_height<<" to "<<w<<","<<h<<std::endl; 3708 3708 3709 3709 _width = w; … … 3714 3714 void Optimizer::TextureAtlasBuilder::Atlas::copySources() 3715 3715 { 3716 osg::notify(osg::INFO)<<"Allocated to "<<_width<<","<<_height<<std::endl;3716 NOTIFY(osg::INFO)<<"Allocated to "<<_width<<","<<_height<<std::endl; 3717 3717 _image->allocateImage(_width,_height,1, 3718 3718 _image->getPixelFormat(),_image->getDataType(), … … 3726 3726 } 3727 3727 3728 osg::notify(osg::INFO)<<"Atlas::copySources() "<<std::endl;3728 NOTIFY(osg::INFO)<<"Atlas::copySources() "<<std::endl; 3729 3729 for(SourceList::iterator itr = _sourceList.begin(); 3730 3730 itr !=_sourceList.end(); … … 3736 3736 if (atlas) 3737 3737 { 3738 osg::notify(osg::INFO)<<"Copying image "<<source->_image->getFileName()<<" to "<<source->_x<<" ,"<<source->_y<<std::endl;3739 osg::notify(osg::INFO)<<" image size "<<source->_image->s()<<","<<source->_image->t()<<std::endl;3738 NOTIFY(osg::INFO)<<"Copying image "<<source->_image->getFileName()<<" to "<<source->_x<<" ,"<<source->_y<<std::endl; 3739 NOTIFY(osg::INFO)<<" image size "<<source->_image->s()<<","<<source->_image->t()<<std::endl; 3740 3740 3741 3741 const osg::Image* sourceImage = source->_image.get(); … … 4098 4098 { 4099 4099 // safe to convert into CLAMP wrap mode. 4100 osg::notify(osg::INFO)<<"Changing wrap mode to CLAMP"<<std::endl;4100 NOTIFY(osg::INFO)<<"Changing wrap mode to CLAMP"<<std::endl; 4101 4101 texture->setWrap(osg::Texture2D::WRAP_S, osg::Texture::CLAMP); 4102 4102 texture->setWrap(osg::Texture2D::WRAP_T, osg::Texture::CLAMP); … … 4207 4207 if (s_repeat || t_repeat) 4208 4208 { 4209 osg::notify(osg::NOTICE)<<"Warning!!! shouldn't get here"<<std::endl;4209 NOTIFY(osg::NOTICE)<<"Warning!!! shouldn't get here"<<std::endl; 4210 4210 } 4211 4211 … … 4238 4238 if (canTexMatBeFlattenedToAllDrawables) 4239 4239 { 4240 // osg::notify(osg::NOTICE)<<"All drawables can be flattened "<<drawables.size()<<std::endl;4240 // NOTIFY(osg::NOTICE)<<"All drawables can be flattened "<<drawables.size()<<std::endl; 4241 4241 for(Drawables::iterator ditr = drawables.begin(); 4242 4242 ditr != drawables.end(); … … 4258 4258 else 4259 4259 { 4260 osg::notify(osg::NOTICE)<<"Error, Optimizer::TextureAtlasVisitor::optimize() shouldn't ever get here..."<<std::endl;4260 NOTIFY(osg::NOTICE)<<"Error, Optimizer::TextureAtlasVisitor::optimize() shouldn't ever get here..."<<std::endl; 4261 4261 } 4262 4262 } … … 4264 4264 else 4265 4265 { 4266 // osg::notify(osg::NOTICE)<<"Applying TexMat "<<drawables.size()<<std::endl;4266 // NOTIFY(osg::NOTICE)<<"Applying TexMat "<<drawables.size()<<std::endl; 4267 4267 stateset->setTextureAttribute(unit, new osg::TexMat(matrix)); 4268 4268 } … … 4344 4344 else 4345 4345 { 4346 osg::notify(osg::NOTICE) << "No parent for this Group" << std::endl;4346 NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; 4347 4347 } 4348 4348 } … … 4385 4385 else 4386 4386 { 4387 osg::notify(osg::NOTICE) << "No parent for this Group" << std::endl;4387 NOTIFY(osg::NOTICE) << "No parent for this Group" << std::endl; 4388 4388 } 4389 4389 } … … 4423 4423 } 4424 4424 else 4425 osg::notify(osg::NOTICE) << "No parent for this LOD" << std::endl;4425 NOTIFY(osg::NOTICE) << "No parent for this LOD" << std::endl; 4426 4426 } 4427 4427 else … … 4461 4461 parent_group->replaceChild(&geode, new_geode.get()); 4462 4462 else 4463 osg::notify(osg::NOTICE) << "No parent for this Geode" << std::endl;4463 NOTIFY(osg::NOTICE) << "No parent for this Geode" << std::endl; 4464 4464 4465 4465 transformGeode(*(new_geode.get())); … … 4495 4495 parent_group->replaceChild(&billboard, new_billboard.get()); 4496 4496 else 4497 osg::notify(osg::NOTICE) << "No parent for this Billboard" << std::endl;4497 NOTIFY(osg::NOTICE) << "No parent for this Billboard" << std::endl; 4498 4498 4499 4499 transformBillboard(*(new_billboard.get()));
