Show
Ignore:
Timestamp:
03/11/10 17:46:01 (4 years ago)
Author:
robert
Message:

Clean up of initialization of statics/use of getenv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgUtil/RenderBin.cpp

    r10504 r11202  
    3131{ 
    3232    public: 
    33         RenderBinPrototypeList() {} 
     33        RenderBinPrototypeList() 
     34        { 
     35            add("RenderBin",new RenderBin(RenderBin::getDefaultRenderBinSortMode())); 
     36            add("StateSortedBin",new RenderBin(RenderBin::SORT_BY_STATE)); 
     37            add("DepthSortedBin",new RenderBin(RenderBin::SORT_BACK_TO_FRONT)); 
     38            add("TraversalOrderBin",new RenderBin(RenderBin::TRAVERSAL_ORDER)); 
     39        } 
     40 
     41        void add(const std::string& name, RenderBin* bin) 
     42        { 
     43            (*this)[name] = bin; 
     44        } 
     45 
    3446        ~RenderBinPrototypeList() {} 
    3547}; 
    36  
    37 // register a RenderStage prototype with the RenderBin prototype list. 
    38 RegisterRenderBinProxy s_registerRenderBinProxy("RenderBin",new RenderBin(RenderBin::getDefaultRenderBinSortMode())); 
    39 RegisterRenderBinProxy s_registerStateSortedBinProxy("StateSortedBin",new RenderBin(RenderBin::SORT_BY_STATE)); 
    40 RegisterRenderBinProxy s_registerDepthSortedBinProxy("DepthSortedBin",new RenderBin(RenderBin::SORT_BACK_TO_FRONT)); 
    41 RegisterRenderBinProxy s_registerTraversalOrderProxy("TraversalOrderBin",new RenderBin(RenderBin::TRAVERSAL_ORDER)); 
    42  
    4348 
    4449static RenderBinPrototypeList* renderBinPrototypeList()