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

Function GetStorageRequirements

Engine/lib/squish/squish.cpp:146–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146int GetStorageRequirements( int width, int height, int flags )
147{
148 // fix any bad flags
149 flags = FixFlags( flags );
150
151 // compute the storage requirements
152 int blockcount = ( ( width + 3 )/4 ) * ( ( height + 3 )/4 );
153 int blocksize = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16;
154 return blockcount*blocksize;
155}
156
157void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric )
158{

Callers

nothing calls this directly

Calls 1

FixFlagsFunction · 0.85

Tested by

no test coverage detected