| 152 | } |
| 153 | |
| 154 | U32 DDSFile::getSizeInBytes() const |
| 155 | { |
| 156 | // TODO: This doesn't take mDepth into account, so |
| 157 | // it doesn't work right for volume textures! |
| 158 | |
| 159 | U32 bytes = 0; |
| 160 | if (mFlags.test(CubeMapFlag)) |
| 161 | { |
| 162 | for(U32 cubeFace=0;cubeFace < Cubemap_Surface_Count;cubeFace++) |
| 163 | for (U32 i = 0; i < mMipMapCount; i++) |
| 164 | bytes += getSurfaceSize(mHeight, mWidth, i); |
| 165 | } |
| 166 | else |
| 167 | { |
| 168 | for (U32 i = 0; i < mMipMapCount; i++) |
| 169 | bytes += getSurfaceSize(mHeight, mWidth, i); |
| 170 | } |
| 171 | |
| 172 | return bytes; |
| 173 | } |
| 174 | |
| 175 | U32 DDSFile::getSizeInBytes( GFXFormat format, U32 height, U32 width, U32 mipLevels ) |
| 176 | { |
no test coverage detected