Ignore:
Timestamp:
06/28/08 17:40:17 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
2 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); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.h

    r2802 r2805  
    1717struct RenderQueueBucket 
    1818{ 
    19         /** should be full texture format, but we as use the same format for all textures 
    20             they differ only in size, and we implicitly assume that textures with the same  
    21             size have exactly the same format 
     19        /** should test for all texture format parameters,  
     20            but we as use the same format for all textures they differ only in size 
    2221        */ 
    23         int mTextureSize; 
     22        int mTexHeight; 
     23        int mTexWidth; 
     24 
     25        bool mHasTexture; 
    2426        bool mAlphaTestEnabled; 
    2527 
Note: See TracChangeset for help on using the changeset viewer.