Changeset 2805 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 06/28/08 17:40:17 (17 years ago)
- 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 66 66 return false; 67 67 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) 70 71 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 } 71 81 72 82 return true; … … 103 113 104 114 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; 106 122 107 123 mBuckets.push_back(bucket); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.h
r2802 r2805 17 17 struct RenderQueueBucket 18 18 { 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 22 21 */ 23 int mTextureSize; 22 int mTexHeight; 23 int mTexWidth; 24 25 bool mHasTexture; 24 26 bool mAlphaTestEnabled; 25 27
Note: See TracChangeset
for help on using the changeset viewer.