Ignore:
Timestamp:
06/28/08 17:40:17 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2804 r2805  
    6666                return false; 
    6767 
    68         int tsize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 
    69         if (tsize != mBuckets[idx]->mTextureSize) 
     68        const bool hasTexture = (mat->GetTexture() != NULL); 
     69 
     70        if (hasTexture != mBuckets[idx]->mHasTexture) 
    7071                return false; 
     72 
     73        if (hasTexture) 
     74        { 
     75                if (mat->GetTexture()->GetWidth() != mBuckets[idx]->mTexWidth) 
     76                        return false; 
     77 
     78                if (mat->GetTexture()->GetHeight() != mBuckets[idx]->mTexHeight) 
     79                        return false; 
     80        } 
    7181 
    7282        return true; 
     
    103113 
    104114                        bucket->mAlphaTestEnabled = mat->IsAlphaTestEnabled(); 
    105                         bucket->mTextureSize = mat->GetTexture() ? mat->GetTexture()->GetByteSize() : 0; 
     115 
     116                        const bool hasTexture = (mat->GetTexture() != NULL); 
     117 
     118                        bucket->mHasTexture = hasTexture;  
     119 
     120                        bucket->mTexWidth = hasTexture ? mat->GetTexture()->GetWidth() : 0; 
     121                        bucket->mTexHeight = hasTexture ? mat->GetTexture()->GetHeight() : 0; 
    106122 
    107123                        mBuckets.push_back(bucket); 
Note: See TracChangeset for help on using the changeset viewer.