| 209 | } |
| 210 | |
| 211 | bool Tr2TextureSubresource::IsValid() const |
| 212 | { |
| 213 | if( HasBox() ) |
| 214 | { |
| 215 | if( m_box.left >= m_box.right || m_box.top >= m_box.bottom || m_box.front >= m_box.back ) |
| 216 | { |
| 217 | return false; |
| 218 | } |
| 219 | } |
| 220 | return m_startFace < m_endFace && m_startMipLevel < m_endMipLevel; |
| 221 | } |
| 222 | |
| 223 | // Crop both subresources to the given bitmaps as well as each others dimensions; |
| 224 | // and run some basic checks on them (IsValid, formats matching, ...). |