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

Method DDSFile

Engine/source/gfx/bitmap/ddsFile.cpp:41–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39U32 DDSFile::smDropMipCount = 0;
40
41DDSFile::DDSFile( const DDSFile &dds )
42 : mFlags( dds.mFlags ),
43 mHeight( dds.mHeight ),
44 mWidth( dds.mWidth ),
45 mDepth( dds.mDepth ),
46 mPitchOrLinearSize( dds.mPitchOrLinearSize ),
47 mMipMapCount( dds.mMipMapCount ),
48 mFormat( dds.mFormat ),
49 mBytesPerPixel( dds.mBytesPerPixel ),
50 mFourCC( dds.mFourCC ),
51 mCacheString( dds.mCacheString ),
52 mSourcePath( dds.mSourcePath ),
53 mHasTransparency( dds.mHasTransparency )
54{
55 VECTOR_SET_ASSOCIATION( mSurfaces );
56 smActiveCopies++;
57
58 for ( U32 i=0; i < dds.mSurfaces.size(); i++ )
59 {
60 SurfaceData *surface = NULL;
61 if ( dds.mSurfaces[i] )
62 surface = new SurfaceData;
63
64 mSurfaces.push_back( surface );
65
66 if ( !surface )
67 continue;
68
69 for ( U32 m=0; m < dds.mSurfaces[i]->mMips.size(); m++ )
70 {
71 U32 size = dds.getSurfaceSize( m );
72 surface->mMips.push_back(new U8[size]);
73 dMemcpy( surface->mMips.last(), dds.mSurfaces[i]->mMips[m], size );
74 }
75 }
76}
77
78void DDSFile::clear()
79{

Callers

nothing calls this directly

Calls 5

dMemcpyFunction · 0.50
sizeMethod · 0.45
push_backMethod · 0.45
getSurfaceSizeMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected