- Timestamp:
- 07/16/08 14:59:55 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.cpp
r2840 r2841 59 59 60 60 61 bool RenderQueue::FitsInBucket(Shape *ent, size_t idx) const 62 { 63 #ifdef TODO 64 Material *mat = ent->GetMaterial(); 65 #else 66 Material *mat = NULL; 67 #endif 61 bool RenderQueue::FitsInBucket(Shape *shape, size_t idx) const 62 { 63 Material *mat = shape->GetMaterial(); 64 68 65 // test if entity belongs to this bucket 69 66 // note: rather slows down the application for some reason!! 70 if ( 0 &&mat->IsAlphaTestEnabled() != mBuckets[idx]->mAlphaTestEnabled)67 if (mat->IsAlphaTestEnabled() != mBuckets[idx]->mAlphaTestEnabled) 71 68 return false; 72 69 … … 91 88 void RenderQueue::Enqueue(SceneEntity *entity) 92 89 { 90 static ShapeContainer shapes; 91 shapes.clear(); 92 93 entity->GetCurrentLODLevel(shapes) 94 95 ShapeContainer::const_iterator sit, sit_end = shapes.end(); 96 97 for (sit = shapes.begin(); sit != sit_end; ++ sit) 98 { 99 Enqueue(*sit); 100 } 101 } 102 103 104 void RenderQueue::Enqueue(Shape *shape) 105 { 93 106 RenderQueueBucket *bucket; 94 107 ++ mSize; 95 #ifdef TODO 108 96 109 if (entity->mRenderQueueBucket) 97 110 { … … 141 154 142 155 bucket->mEntities.push_back(entity); 143 #endif144 145 156 } 146 157 … … 195 206 Material *mat = shape->GetMaterial(); 196 207 int tsize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 197 #ifdef TODO 208 198 209 float dist = SqrMagnitude(shape->GetBoundingBox().Center() - mCamera->GetPosition()); 199 #else 200 float dist = -1; 201 #endif 210 202 211 Debug << "e: " << shape << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << endl; 203 212 }
Note: See TracChangeset
for help on using the changeset viewer.