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

Method readNextMip

Engine/source/gfx/bitmap/ddsFile.cpp:583–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581}
582
583void DDSFile::SurfaceData::readNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel, bool skip)
584{
585 U32 size = dds->getSurfaceSize(height, width, mipLevel);
586
587 // If we're skipping this mip then seek forward.
588 if ( skip )
589 s.setPosition( s.getPosition() + size );
590 else
591 {
592 mMips.push_back(new U8[size]);
593 if(!s.read(size, mMips.last()))
594 Con::errorf("DDSFile::SurfaceData::addNextMip - failed to read mip!");
595 }
596}
597
598void DDSFile::SurfaceData::writeNextMip(DDSFile *dds, Stream &s, U32 height, U32 width, U32 mipLevel)
599{

Callers 1

readMethod · 0.80

Calls 7

errorfFunction · 0.50
getSurfaceSizeMethod · 0.45
setPositionMethod · 0.45
getPositionMethod · 0.45
push_backMethod · 0.45
readMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected