MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getSizeInBytes

Method getSizeInBytes

Engine/source/gfx/bitmap/ddsFile.cpp:154–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154U32 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
175U32 DDSFile::getSizeInBytes( GFXFormat format, U32 height, U32 width, U32 mipLevels )
176{

Callers 10

initVertexFeaturesMethod · 0.45
assembleShapeMethod · 0.45
calculateSizeMethod · 0.45
initHandlesMethod · 0.45
_initVerticesFormatMethod · 0.45
setBuffersMethod · 0.45
setFormatMethod · 0.45
stepMethod · 0.45

Calls 4

isCompressedFormatFunction · 0.85
getMaxFunction · 0.85
U32Enum · 0.50
testMethod · 0.45

Tested by

no test coverage detected