MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / readNextMip

Method readNextMip

Engine/source/gfx/bitmap/ddsLoader.cpp:770–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

768}
769
770void DDSFile::SurfaceData::readNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel, bool skip)
771{
772 U32 size = dds->getSurfaceSize(height, width, mipLevel);
773
774 // If we're skipping this mip then seek forward.
775 if ( skip )
776 s.setPosition( s.getPosition() + size );
777 else
778 {
779 mMips.push_back(new U8[size]);
780 if(!s.read(size, mMips.last()))
781 Con::errorf("DDSFile::SurfaceData::addNextMip - failed to read mip!");
782 }
783}
784
785void DDSFile::SurfaceData::writeNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel)
786{

Callers 1

readMethod · 0.80

Calls 7

errorfFunction · 0.85
lastMethod · 0.80
getSurfaceSizeMethod · 0.45
setPositionMethod · 0.45
getPositionMethod · 0.45
push_backMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected