clarified the texture-atlas varnames a bit. (shadow vars cleanup)

This commit is contained in:
Azaezel 2018-03-13 12:16:17 -05:00
parent ef0a4bee08
commit 57af794ee3

View file

@ -420,24 +420,24 @@ void TSLastDetail::_update()
imposterCap->end();
Point2I texSize( destBmp.getWidth(mip), destBmp.getHeight(mip) );
Point2I atlasSize( destBmp.getWidth(mip), destBmp.getHeight(mip) );
// Ok... pack in bitmaps till we run out.
for ( S32 y=0; y+currDim <= texSize.y; )
for ( S32 y=0; y+currDim <= atlasSize.y; )
{
for ( S32 x=0; x+currDim <= texSize.x; )
for ( S32 x=0; x+currDim <= atlasSize.x; )
{
// Copy the next bitmap to the dest texture.
GBitmap* bmp = bitmaps.first();
GBitmap* cell = bitmaps.first();
bitmaps.pop_front();
destBmp.copyRect( bmp, RectI( 0, 0, currDim, currDim ), Point2I( x, y ), 0, mip );
delete bmp;
destBmp.copyRect(cell, RectI( 0, 0, currDim, currDim ), Point2I( x, y ), 0, mip );
delete cell;
// Copy the next normal to the dest texture.
GBitmap* normalmap = normalmaps.first();
GBitmap* cellNormalmap = normalmaps.first();
normalmaps.pop_front();
destNormal.copyRect( normalmap, RectI( 0, 0, currDim, currDim ), Point2I( x, y ), 0, mip );
delete normalmap;
destNormal.copyRect(cellNormalmap, RectI( 0, 0, currDim, currDim ), Point2I( x, y ), 0, mip );
delete cellNormalmap;
// Did we finish?
if ( bitmaps.empty() )