Ignore:
Timestamp:
10/21/08 23:20:17 (16 years ago)
Author:
mattausch
Message:

updated render queue: as we assume incoming nodes to be sorted front to back,
no sorting is required anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.h

    r3054 r3060  
    1717struct RenderQueueBucket 
    1818{ 
     19        inline bool IsEmpty() const { return mShapes.empty();} 
     20 
    1921        //////// 
    2022        //-- the attributes used to sort the materials 
    21         /// texture parameters 
     23         
     24        // texture related parameters 
    2225        int mTexHeight; 
    2326        int mTexWidth; 
     
    3942 
    4043        /// minimal distance to the camera 
    41         float mMinDistance; 
     44        //float mMinDistance; 
    4245 
    4346        /// the shapes that belong to a bucket 
     
    4952        to minimize state changes while approximately keeping front-to-back order 
    5053        The implementation roughly follows the suggested implementation in  
    51         Tom Forsyth's article on render state changes. It requires sorting only on  
    52         bucket level and therefore has very     low overhead. 
     54        Tom Forsyth's article on render state changes. It assumes that the incoming 
     55        objecs are roughly front to back level and therefore does not require any sorting  
     56        and therefore has very  low overhead. 
    5357*/ 
    5458class RenderQueue 
     
    8892protected: 
    8993 
    90         void Sort(); 
     94        //void Sort(); 
    9195 
    9296        inline bool FitsInBucket(Shape *shape, size_t idx) const; 
     
    100104 
    101105        /////////// 
     106        //-- members 
    102107 
     108        // the current render state 
    103109        RenderState *mState; 
    104110         
    105111        Camera *mCamera; 
    106         //SceneEntityContainer mEntities; 
    107         int mMinSizeForSorting; 
    108112        /// each bucket contains objects with similar materials that don't cause a hard state change 
    109113        std::vector<RenderQueueBucket *> mBuckets; 
     114        /// this are the buckets that where touched until the last clear. They are sorted by distance 
     115        std::vector<RenderQueueBucket *> mActiveBuckets; 
    110116 
    111117        int mNumEntries; 
Note: See TracChangeset for help on using the changeset viewer.