- Timestamp:
- 10/21/08 23:20:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.h
r3054 r3060 17 17 struct RenderQueueBucket 18 18 { 19 inline bool IsEmpty() const { return mShapes.empty();} 20 19 21 //////// 20 22 //-- the attributes used to sort the materials 21 /// texture parameters 23 24 // texture related parameters 22 25 int mTexHeight; 23 26 int mTexWidth; … … 39 42 40 43 /// minimal distance to the camera 41 float mMinDistance;44 //float mMinDistance; 42 45 43 46 /// the shapes that belong to a bucket … … 49 52 to minimize state changes while approximately keeping front-to-back order 50 53 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. 53 57 */ 54 58 class RenderQueue … … 88 92 protected: 89 93 90 void Sort();94 //void Sort(); 91 95 92 96 inline bool FitsInBucket(Shape *shape, size_t idx) const; … … 100 104 101 105 /////////// 106 //-- members 102 107 108 // the current render state 103 109 RenderState *mState; 104 110 105 111 Camera *mCamera; 106 //SceneEntityContainer mEntities;107 int mMinSizeForSorting;108 112 /// each bucket contains objects with similar materials that don't cause a hard state change 109 113 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; 110 116 111 117 int mNumEntries;
Note: See TracChangeset
for help on using the changeset viewer.