Show
Ignore:
Timestamp:
10/21/06 13:50:48 (2 years ago)
Author:
dirk
Message:

Added Tri and occed tri stats
added NVPerfKitSDK demo stats in testOcclusionCulling.cpp. These should become core stats later…

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/Dirk_RenderTraversalWork/Source/System/Action/RenderTraversal/OSGOcclusionCullingTreeBuilder.h

    r299 r342  
    5050 
    5151#include "OSGHashSorter.h" 
     52#include "OSGStatElemDesc.h" 
     53#include "OSGStatIntElem.h" 
     54#include "OSGStatRealElem.h" 
    5255 
    5356#include "OSGTreeBuilderBase.h" 
     
    8689    static StatElemDesc<StatIntElem>  statNOccInvisible; 
    8790    static StatElemDesc<StatRealElem> statNOccSuccessTestPer; 
     91    static StatElemDesc<StatIntElem>  statNOccTriangles; 
    8892     
    8993    //----------------------------------------------------------------------- 
     
    99103    //----------------------------------------------------------------------- 
    100104 
     105    //! Sorting mode to use 
     106    typedef enum {  
     107        ModeScalar, //!< Use standard scalar sort 
     108        ModeBucket, //!< Use fixed bucket sorting 
     109        ModeAdaptiveBucket  //!< Use adaptive bucket sorting 
     110    } SortModeE;    
     111     
     112    static SortModeE setSortMode(SortModeE mode); 
     113     
     114    static UInt32 setNBuckets(UInt32 nbuckets); 
     115     
    101116    //----------------------------------------------------------------------- 
    102117    //   class functions                                                      
     
    202217    bool    _inTesting;  //!< Whether in testing mode or not 
    203218     
    204     static const int _nBuckets = 1000;     //!< number of buckets for approximate sorting 
     219    static UInt32     _nBuckets;  //!< number of buckets for approximate sorting 
     220    static SortModeE  _sortMode;  //!< Sorting mode to use 
     221     
    205222    std::vector<RenderTreeNode*> _buckets; //!< buckets for approximate sorting 
    206223    std::vector<RenderTreeNode*> _bucketsWork; //!< work copy of buckets 
     
    208225    Real32 _bucketHigh;                    //!< value for highest bucket 
    209226    Real32 _bucketScale;                   //!< 1 / all buckets width 
    210      
     227    
    211228    std::vector<RenderTreeNode*> _testNodes; //!< Nodes currently being tested 
    212229