-------------------------------------------------------------------------------------- Description: Check if subresource covers the entire textures (all slices and all mip levels). Arguments: texture - Texture to check against Return Value: true If subresource data covers the entire texture false Otherwise --------------------------------------------------------------------------------------
| 100 | // false Otherwise |
| 101 | // -------------------------------------------------------------------------------------- |
| 102 | bool Tr2TextureSubresource::IsSubresourceFull( const Tr2BitmapDimensions& texture ) const |
| 103 | { |
| 104 | if( m_startFace > 0 || m_endFace < texture.GetArraySize() ) |
| 105 | { |
| 106 | return false; |
| 107 | } |
| 108 | if( m_startMipLevel > 0 ) |
| 109 | { |
| 110 | return false; |
| 111 | } |
| 112 | if( m_endMipLevel < texture.GetTrueMipCount() ) |
| 113 | { |
| 114 | return false; |
| 115 | } |
| 116 | if( HasBox() ) |
| 117 | { |
| 118 | if( m_box.left > 0 || m_box.top > 0 || m_box.front > 0 ) |
| 119 | { |
| 120 | return false; |
| 121 | } |
| 122 | if( m_box.right < texture.GetWidth() || m_box.bottom < texture.GetHeight() || m_box.back < texture.GetDepth() ) |
| 123 | { |
| 124 | return false; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | return true; |
| 129 | } |
| 130 | |
| 131 | bool Tr2TextureSubresource::IsValidForBitmap( const Tr2BitmapDimensions& bitmap ) const |
| 132 | { |