Merge branch 'development' into EngineAPI-Refactor

This commit is contained in:
Areloch 2018-12-09 14:48:50 -06:00 committed by GitHub
commit 3a71c75596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1937 changed files with 102332 additions and 70549 deletions

View file

@ -82,7 +82,7 @@ TSLastDetail::TSLastDetail( TSShape *shape,
mDl = dl;
mDim = getMax( dim, (S32)32 );
mRadius = mShape->radius;
mRadius = mShape->mRadius;
mCenter = mShape->center;
mCachePath = cachePath;
@ -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() )