Ignore:
Timestamp:
07/16/08 14:59:55 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2840 r2841  
    5959 
    6060 
    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 
     61bool RenderQueue::FitsInBucket(Shape *shape, size_t idx) const 
     62{ 
     63        Material *mat = shape->GetMaterial(); 
     64 
    6865        // test if entity belongs to this bucket 
    6966        // note: rather slows down the application for some reason!! 
    70         if (0 && mat->IsAlphaTestEnabled() != mBuckets[idx]->mAlphaTestEnabled) 
     67        if (mat->IsAlphaTestEnabled() != mBuckets[idx]->mAlphaTestEnabled) 
    7168                return false; 
    7269 
     
    9188void RenderQueue::Enqueue(SceneEntity *entity) 
    9289{ 
     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 
     104void RenderQueue::Enqueue(Shape *shape) 
     105{ 
    93106        RenderQueueBucket *bucket; 
    94107        ++ mSize; 
    95 #ifdef TODO 
     108         
    96109        if (entity->mRenderQueueBucket) 
    97110        { 
     
    141154 
    142155        bucket->mEntities.push_back(entity); 
    143 #endif 
    144  
    145156} 
    146157 
     
    195206                        Material *mat = shape->GetMaterial(); 
    196207                        int tsize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 
    197 #ifdef TODO 
     208                         
    198209                        float dist = SqrMagnitude(shape->GetBoundingBox().Center() - mCamera->GetPosition()); 
    199 #else 
    200                         float dist = -1; 
    201 #endif 
     210                         
    202211                        Debug << "e: " << shape << " a: " << mat->IsAlphaTestEnabled() << " s: " << tsize << " d: " << dist << " " << endl; 
    203212                } 
Note: See TracChangeset for help on using the changeset viewer.