Texture packer fixes and new version (this breaks older ETA files). Now the MD5 hash is saved into the texture region info, in order to verify on the texture atlas update if the file changed (instead of relying on the file modification date that's local).

UIViewPager now takes into account the amount of displacement when starting a page change animation, shortening the animation when it's closer to the objective.
TexturePacker now accepts any pixel density instead of the fixed PixelDensitySizes.
This commit is contained in:
Martín Lucas Golini
2020-03-02 13:31:00 -03:00
parent e530e38895
commit 5d17e42d03
13 changed files with 95 additions and 66 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -8,9 +8,11 @@ namespace EE { namespace Graphics { namespace Private {
#pragma pack( push, 1 )
#define HDR_NAME_SIZE 128
#define HDR_HASH_SIZE 16 // MD5 hash - 128 bit
struct sTextureRegionHdr {
char Name[HDR_NAME_SIZE];
char Hash[HDR_HASH_SIZE];
Uint64 Date;
Int32 X;
Int32 Y;
@@ -49,6 +51,7 @@ struct sTextureAtlasHdr {
char Reserved[15];
};
#define HDR_TEXTURE_ATLAS_VERSION 3000
#define HDR_TEXTURE_ATLAS_ALLOW_FLIPPING ( 1 << 0 )
#define HDR_TEXTURE_ATLAS_REMOVE_EXTENSION ( 1 << 1 )
#define HDR_TEXTURE_ATLAS_POW_OF_TWO ( 1 << 2 )

View File

@@ -30,7 +30,6 @@
#include <eepp/graphics/base.hpp>
#include <eepp/graphics/image.hpp>
#include <eepp/graphics/packerhelper.hpp>
#include <eepp/graphics/pixeldensity.hpp>
#include <eepp/graphics/texture.hpp>
#include <list>
@@ -73,7 +72,7 @@ class EE_API TexturePacker {
*/
static TexturePacker*
New( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity = PixelDensitySize::MDPI,
const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::TextureFilter& textureFilter = Texture::TextureFilter::Linear,
@@ -104,7 +103,7 @@ class EE_API TexturePacker {
*orientation ). So avoid it for eepp.
*/
TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity = PixelDensitySize::MDPI,
const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::TextureFilter& textureFilter = Texture::TextureFilter::Linear,
@@ -136,13 +135,13 @@ class EE_API TexturePacker {
*called, it will be called automatically by the function ( so you don't need to call it ).
* @param Filepath The path were it will be saved the new texture atlas.
* @param Format The image format of the new texture atlas.
* @param SaveExtensions Indicates if the extensions of the image files must be saved. Usually
*you wan't to find the TextureRegions by its name without extension, but this can be changed
*here.
* @param KeepExtensions Indicates if the extensions of the image files must be saved. Usually
* you want to find the TextureRegions by its name without extension, but this can be changed
* here.
*/
void save( const std::string& Filepath,
const Image::SaveType& Format = Image::SaveType::SAVE_TYPE_PNG,
const bool& SaveExtensions = false );
const bool& KeepExtensions = false );
/** Clear all the textures added */
void close();
@@ -170,7 +169,7 @@ class EE_API TexturePacker {
*orientation ). So avoid it for eepp.
*/
void setOptions( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity = PixelDensitySize::MDPI,
const Float& pixelDensity = 1,
const bool& forcePowOfTwo = true, const bool& scalableSVG = false,
const Uint32& pixelBorder = 2,
const Texture::TextureFilter& textureFilter = Texture::TextureFilter::Linear,
@@ -207,9 +206,9 @@ class EE_API TexturePacker {
Int32 mPlacedCount;
bool mForcePowOfTwo;
Int32 mPixelBorder;
PixelDensitySize mPixelDensity;
Uint32 mPixelDensity; /* The multiplier value * 100 ( example: PD = 2, here is 200 ) */
Texture::TextureFilter mTextureFilter;
bool mSaveExtensions;
bool mKeepExtensions;
bool mScalableSVG;
Image::SaveType mFormat;

View File

@@ -1,3 +1,4 @@
#include <algorithm>
#include <eepp/graphics/packerhelper.hpp>
#include <eepp/graphics/textureatlas.hpp>
#include <eepp/graphics/textureatlasloader.hpp>
@@ -6,7 +7,9 @@
#include <eepp/system/filesystem.hpp>
#include <eepp/system/iostreamfile.hpp>
#include <eepp/system/iostreammemory.hpp>
#include <eepp/system/md5.hpp>
#include <eepp/system/packmanager.hpp>
#include <iterator>
namespace EE { namespace Graphics {
@@ -259,7 +262,11 @@ void TextureAtlasLoader::createTextureRegions() {
for ( Int32 i = 0; i < tTexHdr->TextureRegionCount; i++ ) {
sTextureRegionHdr* tSh = &tTexAtlas->TextureRegions[i];
std::string TextureRegionName( &tSh->Name[0] );
std::string TextureRegionName( tSh->Name );
if ( mTexGrHdr.Flags & HDR_TEXTURE_ATLAS_REMOVE_EXTENSION )
TextureRegionName = FileSystem::fileRemoveExtension( TextureRegionName );
Rect tRect( tSh->X, tSh->Y, tSh->X + tSh->Width, tSh->Y + tSh->Height );
TextureRegion* tTextureRegion = TextureRegion::New(
@@ -267,7 +274,7 @@ void TextureAtlasLoader::createTextureRegions() {
Sizef( (Float)tSh->DestWidth, (Float)tSh->DestHeight ),
Vector2i( tSh->OffsetX, tSh->OffsetY ), TextureRegionName );
tTextureRegion->setPixelDensity( PixelDensity::toFloat( tSh->PixelDensity ) );
tTextureRegion->setPixelDensity( tSh->PixelDensity / 100.f );
// if ( tSh->Flags & HDR_TEXTUREREGION_FLAG_FLIPED )
// Should rotate the sub texture, but.. sub texture rotation is not stored.
@@ -368,6 +375,10 @@ bool TextureAtlasLoader::updateTextureAtlas() {
return false;
}
#define ATLAS_IS_UPDATED 0
#define ATLAS_NEEDS_RECREATE 2
#define ATLAS_NEEDS_HDR_REWRITE 1
bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::string ImagesPath,
Sizei maxImageSize ) {
if ( !TextureAtlasPath.size() || !ImagesPath.size() ||
@@ -383,8 +394,8 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
Int32 x, y, c;
Int32 NeedUpdate = 0;
PixelDensitySize pixelDensity = PixelDensitySize::MDPI;
Int32 NeedUpdate = ATLAS_IS_UPDATED;
Float pixelDensity = 1;
FileSystem::dirPathAddSlashAtEnd( ImagesPath );
@@ -395,7 +406,7 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
totalTextureRegions += mTempAtlass[z].Texture.TextureRegionCount;
if ( mTempAtlass[z].Texture.TextureRegionCount > 0 ) {
pixelDensity = (PixelDensitySize)mTempAtlass[z].TextureRegions[0].PixelDensity;
pixelDensity = mTempAtlass[z].TextureRegions[0].PixelDensity / 100.f;
}
}
@@ -411,13 +422,13 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
}
if ( totalTextureRegions != totalImages ) {
NeedUpdate = 2;
NeedUpdate = ATLAS_NEEDS_RECREATE;
} else {
for ( z = 0; z < mTempAtlass.size(); z++ ) {
sTempTexAtlas* tTexAtlas = &mTempAtlass[z];
sTextureHdr* tTexHdr = &tTexAtlas->Texture;
if ( 2 != NeedUpdate ) {
if ( ATLAS_NEEDS_RECREATE != NeedUpdate ) {
for ( Int32 i = 0; i < tTexHdr->TextureRegionCount; i++ ) {
sTextureRegionHdr* tSh = &tTexAtlas->TextureRegions[i];
@@ -425,27 +436,33 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
if ( FileSystem::fileSize( path ) ) {
if ( tSh->Date != FileSystem::fileGetModificationDate( path ) ) {
if ( Image::getInfo( path.c_str(), &x, &y, &c ) ) {
if ( ( !( tSh->Flags & HDR_TEXTUREREGION_FLAG_FLIPED ) &&
tSh->Width == x &&
tSh->Height == y ) || // If size or channels changed, the
// image need update
( ( tSh->Flags & HDR_TEXTUREREGION_FLAG_FLIPED ) &&
tSh->Width == y && tSh->Height == x ) ||
tSh->Channels != c ) {
NeedUpdate = 1; // Only update the image with the newest one
MD5::Result result = MD5::fromFile( path );
if ( !std::equal( std::begin( tSh->Hash ), std::end( tSh->Hash ),
std::begin( result.digest ) ) ) {
if ( Image::getInfo( path.c_str(), &x, &y, &c ) ) {
// If size or channels changed, the image need update.
if ( ( !( tSh->Flags & HDR_TEXTUREREGION_FLAG_FLIPED ) &&
tSh->Width == x && tSh->Height == y ) ||
( ( tSh->Flags & HDR_TEXTUREREGION_FLAG_FLIPED ) &&
tSh->Width == y && tSh->Height == x ) ||
tSh->Channels != c ) {
// Only update the image with the newest one.
NeedUpdate = ATLAS_NEEDS_HDR_REWRITE;
} else {
// The image has changed, recreate all.
NeedUpdate = ATLAS_NEEDS_RECREATE;
break;
}
} else {
NeedUpdate = 2; // The image change it, recreate all
// Something is wrong on the image.
NeedUpdate = ATLAS_NEEDS_RECREATE;
break;
}
} else {
NeedUpdate = 2; // Something is wrong on the image
break;
}
}
} else {
NeedUpdate = 2; // Need recreation of the whole texture atlas, some image
// where deleted.
// Need recreation of the whole texture atlas, some image where deleted.
NeedUpdate = ATLAS_NEEDS_RECREATE;
break;
}
}
@@ -455,11 +472,11 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
}
}
if ( NeedUpdate ) {
if ( NeedUpdate != ATLAS_IS_UPDATED ) {
std::string tapath( FileSystem::fileRemoveExtension( TextureAtlasPath ) + "." +
Image::saveTypeToExtension( mTexGrHdr.Format ) );
if ( 2 == NeedUpdate ) {
if ( ATLAS_NEEDS_RECREATE == NeedUpdate ) {
TexturePacker tp(
maxImageSize.getWidth() == 0 ? mTexGrHdr.Width : maxImageSize.getWidth(),
maxImageSize.getHeight() == 0 ? mTexGrHdr.Height : maxImageSize.getHeight(),
@@ -475,7 +492,7 @@ bool TextureAtlasLoader::updateTextureAtlas( std::string TextureAtlasPath, std::
}
tp.save( tapath, (Image::SaveType)mTexGrHdr.Format );
} else if ( 1 == NeedUpdate ) {
} else if ( ATLAS_NEEDS_HDR_REWRITE == NeedUpdate ) {
std::string etapath =
FileSystem::fileRemoveExtension( tapath ) + EE_TEXTURE_ATLAS_EXTENSION;

View File

@@ -4,6 +4,7 @@
#include <eepp/graphics/texturepackertex.hpp>
#include <eepp/system/filesystem.hpp>
#include <eepp/system/iostreamfile.hpp>
#include <eepp/system/md5.hpp>
#include <eepp/system/sys.hpp>
namespace EE { namespace Graphics {
@@ -13,7 +14,7 @@ TexturePacker* TexturePacker::New() {
}
TexturePacker* TexturePacker::New( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity, const bool& forcePowOfTwo,
const Float& pixelDensity, const bool& forcePowOfTwo,
const bool& scalableSVG, const Uint32& pixelBorder,
const Texture::TextureFilter& textureFilter,
const bool& allowChilds, const bool& allowFlipping ) {
@@ -22,7 +23,7 @@ TexturePacker* TexturePacker::New( const Uint32& maxWidth, const Uint32& maxHeig
}
TexturePacker::TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity, const bool& forcePowOfTwo,
const Float& pixelDensity, const bool& forcePowOfTwo,
const bool& scalableSVG, const Uint32& pixelBorder,
const Texture::TextureFilter& textureFilter, const bool& allowChilds,
const bool& allowFlipping ) :
@@ -40,9 +41,9 @@ TexturePacker::TexturePacker( const Uint32& maxWidth, const Uint32& maxHeight,
mPlacedCount( 0 ),
mForcePowOfTwo( true ),
mPixelBorder( 0 ),
mPixelDensity( pixelDensity ),
mPixelDensity( eefloor( pixelDensity * 100 ) ),
mTextureFilter( textureFilter ),
mSaveExtensions( false ),
mKeepExtensions( false ),
mScalableSVG( scalableSVG ),
mFormat( Image::SaveType::SAVE_TYPE_PNG ) {
setOptions( maxWidth, maxHeight, pixelDensity, forcePowOfTwo, scalableSVG, pixelBorder,
@@ -64,9 +65,9 @@ TexturePacker::TexturePacker() :
mPlacedCount( 0 ),
mForcePowOfTwo( true ),
mPixelBorder( 0 ),
mPixelDensity( PixelDensitySize::MDPI ),
mPixelDensity( 1 ),
mTextureFilter( Texture::TextureFilter::Linear ),
mSaveExtensions( false ),
mKeepExtensions( false ),
mScalableSVG( false ),
mFormat( Image::SaveType::SAVE_TYPE_PNG ) {}
@@ -133,7 +134,7 @@ Uint32 TexturePacker::getAtlasNumChannels() {
}
void TexturePacker::setOptions( const Uint32& maxWidth, const Uint32& maxHeight,
const PixelDensitySize& pixelDensity, const bool& forcePowOfTwo,
const Float& pixelDensity, const bool& forcePowOfTwo,
const bool& scalableSVG, const Uint32& pixelBorder,
const Texture::TextureFilter& textureFilter,
const bool& allowChilds, const bool& allowFlipping ) {
@@ -151,7 +152,7 @@ void TexturePacker::setOptions( const Uint32& maxWidth, const Uint32& maxHeight,
mAllowFlipping = allowFlipping;
mAllowChilds = allowChilds;
mPixelBorder = pixelBorder;
mPixelDensity = pixelDensity;
mPixelDensity = eefloor( pixelDensity * 100 );
mTextureFilter = textureFilter;
mScalableSVG = scalableSVG;
}
@@ -399,8 +400,8 @@ void TexturePacker::insertTexture( TexturePackerTex* t, TexturePackerNode* bestF
}
void TexturePacker::createChild() {
mChild = TexturePacker::New( mWidth, mHeight, mPixelDensity, mForcePowOfTwo, mScalableSVG,
mPixelBorder, mTextureFilter, mAllowFlipping );
mChild = TexturePacker::New( mWidth, mHeight, mPixelDensity / 100.f, mForcePowOfTwo,
mScalableSVG, mPixelBorder, mTextureFilter, mAllowFlipping );
std::list<TexturePackerTex*>::iterator it;
std::list<std::list<TexturePackerTex*>::iterator> remove;
@@ -494,8 +495,7 @@ bool TexturePacker::addTexture( const std::string& TexturePath ) {
if ( FileSystem::fileExists( TexturePath ) ) {
Image::FormatConfiguration imageFormatConfiguration;
imageFormatConfiguration.svgScale( mScalableSVG ? PixelDensity::toFloat( mPixelDensity )
: 1.f );
imageFormatConfiguration.svgScale( mScalableSVG ? mPixelDensity / 100.f : 1.f );
TexturePackerTex* TPack =
eeNew( TexturePackerTex, ( TexturePath, imageFormatConfiguration ) );
@@ -605,7 +605,7 @@ Int32 TexturePacker::packTextures() {
}
void TexturePacker::save( const std::string& Filepath, const Image::SaveType& Format,
const bool& SaveExtensions ) {
const bool& KeepExtensions ) {
if ( !mPacked )
packTextures();
@@ -613,7 +613,7 @@ void TexturePacker::save( const std::string& Filepath, const Image::SaveType& Fo
return;
mFilepath = Filepath;
mSaveExtensions = SaveExtensions;
mKeepExtensions = KeepExtensions;
Image Img( (Uint32)mWidth, (Uint32)mHeight, getAtlasNumChannels() );
@@ -681,7 +681,7 @@ void TexturePacker::saveTextureRegions() {
sTextureAtlasHdr TexGrHdr;
TexGrHdr.Magic = EE_TEXTURE_ATLAS_MAGIC;
TexGrHdr.Version = 2000;
TexGrHdr.Version = HDR_TEXTURE_ATLAS_VERSION;
TexGrHdr.Date = static_cast<Uint64>( Sys::getSystemTime() );
TexGrHdr.TextureCount = 1;
TexGrHdr.Format = mFormat;
@@ -697,7 +697,7 @@ void TexturePacker::saveTextureRegions() {
if ( mAllowFlipping )
TexGrHdr.Flags |= HDR_TEXTURE_ATLAS_ALLOW_FLIPPING;
if ( !mSaveExtensions )
if ( !mKeepExtensions )
TexGrHdr.Flags |= HDR_TEXTURE_ATLAS_REMOVE_EXTENSION;
if ( mForcePowOfTwo )
@@ -747,9 +747,6 @@ void TexturePacker::createTextureRegionsHdr( TexturePacker* Packer,
if ( tTex->placed() ) {
std::string name = FileSystem::fileNameFromPath( tTex->name() );
if ( !mSaveExtensions )
name = FileSystem::fileRemoveExtension( name );
if ( name.size() > HDR_NAME_SIZE )
name.resize( HDR_NAME_SIZE );
@@ -757,6 +754,9 @@ void TexturePacker::createTextureRegionsHdr( TexturePacker* Packer,
String::strCopy( tTextureRegionHdr.Name, name.c_str(), HDR_NAME_SIZE );
if ( !mKeepExtensions )
name = FileSystem::fileRemoveExtension( name );
tTextureRegionHdr.ResourceID = String::hash( name );
tTextureRegionHdr.Width = tTex->width();
tTextureRegionHdr.Height = tTex->height();
@@ -769,7 +769,9 @@ void TexturePacker::createTextureRegionsHdr( TexturePacker* Packer,
tTextureRegionHdr.Y = tTex->y();
tTextureRegionHdr.Date = FileSystem::fileGetModificationDate( tTex->name() );
tTextureRegionHdr.Flags = 0;
tTextureRegionHdr.PixelDensity = (Uint32)mPixelDensity;
tTextureRegionHdr.PixelDensity = mPixelDensity;
MD5::Result md5Result = MD5::fromFile( tTex->name() );
memcpy( tTextureRegionHdr.Hash, &md5Result.digest[0], HDR_HASH_SIZE );
if ( tTex->flipped() )
tTextureRegionHdr.Flags |= HDR_TEXTUREREGION_FLAG_FLIPED;
@@ -815,7 +817,7 @@ void TexturePacker::childSave( const Image::SaveType& Format ) {
std::string fExt = FileSystem::fileExtension( LastParent->getFilepath() );
std::string fName = fFpath + "-ch" + String::toStr( ParentCount ) + "." + fExt;
mChild->save( fName, Format, mSaveExtensions );
mChild->save( fName, Format, mKeepExtensions );
}
}
}

View File

@@ -169,8 +169,9 @@ void TextureAtlasNew::textureAtlasSave( const Event* Event ) {
if ( Res1 && Res2 ) {
TexturePacker* texturePacker = TexturePacker::New(
w, h, PixelDensity::fromString( mPixelDensity->getText() ), mForcePow2->isChecked(),
mScalableSVG->isChecked(), b, textureFilter, mAllowChilds->isChecked(), false );
w, h, PixelDensity::toFloat( PixelDensity::fromString( mPixelDensity->getText() ) ),
mForcePow2->isChecked(), mScalableSVG->isChecked(), b, textureFilter,
mAllowChilds->isChecked(), false );
texturePacker->addTexturesPath( mTGPath->getText() );

View File

@@ -206,8 +206,12 @@ void UIViewPager::moveToPage( const Int32& pageNum, bool animate ) {
mCurrentPage = pageNum;
if ( animate ) {
Float initPos = -mDisplacement;
Float endPos = -getLength() * mCurrentPage;
Float normalizedDisplacement = mDisplacement - mCurrentPage * getLength();
Float normalizedProgress =
getLength() != 0 ? eeabs( normalizedDisplacement ) / getLength() : 1;
Action* action = Actions::MoveCoordinate::New(
initPos, -getLength() * mCurrentPage, mPageTransitionDuration, mTimingFunction,
initPos, endPos, mPageTransitionDuration * normalizedProgress, mTimingFunction,
mOrientation == UIOrientation::Horizontal ? Actions::MoveCoordinate::CoordinateX
: Actions::MoveCoordinate::CoordinateY,
Actions::MoveCoordinate::CoordinateType::PixelPosition );

View File

@@ -234,7 +234,7 @@ void EETest::createUIThemeTextureAtlas() {
else if ( mThemeName.find( "1.5x" ) != std::string::npos )
PD = PixelDensitySize::HDPI;
TexturePacker tp( 2048, 2048, PD, true, false, 2 );
TexturePacker tp( 2048, 2048, PixelDensity::toFloat( PD ), true, false, 2 );
tp.addTexturesPath( Path );
tp.packTextures();
tp.save( tgpath + ".png", Image::SaveType::SAVE_TYPE_PNG );
@@ -1333,13 +1333,15 @@ void EETest::onTextureLoaded( ResourceLoader* ) {
void EETest::loadTextures() {
if ( !FileSystem::fileExists( MyPath + "atlases/bnb.eta" ) ) {
TexturePacker tp( 1024, 512, PixelDensitySize::MDPI, true, false, 1 );
TexturePacker tp( 1024, 512, PixelDensity::toFloat( PixelDensitySize::MDPI ), true, false,
1 );
tp.addTexturesPath( MyPath + "atlases/bnb/" );
tp.save( MyPath + "atlases/bnb.png" );
}
if ( !FileSystem::fileExists( MyPath + "atlases/tiles.eta" ) ) {
TexturePacker tp( 256, 32, PixelDensitySize::MDPI, true, false, 0 );
TexturePacker tp( 256, 32, PixelDensity::toFloat( PixelDensitySize::MDPI ), true, false,
0 );
tp.addTexturesPath( MyPath + "atlases/tiles/" );
tp.save( MyPath + "atlases/tiles.png" );
}
@@ -1911,7 +1913,7 @@ void EETest::input() {
if ( KM->isKeyUp( KEY_F1 ) )
Graphics::ShaderProgramManager::instance()->reload();
UISceneNode * uiSceneNode = SceneManager::instance()->getUISceneNode();
UISceneNode* uiSceneNode = SceneManager::instance()->getUISceneNode();
if ( KM->isKeyUp( KEY_F6 ) )
uiSceneNode->setHighlightOver( !uiSceneNode->getHighlightOver() );

View File

@@ -1,4 +1,5 @@
#include <args/args.hxx>
#include <eepp/graphics/pixeldensity.hpp>
#include <eepp/graphics/textureatlasloader.hpp>
#include <eepp/graphics/texturepacker.hpp>
#include <eepp/system/filesystem.hpp>
@@ -139,9 +140,9 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
}
if ( !FileSystem::fileExists( outputFile.Get() ) ) {
TexturePacker tp( width.Get(), height.Get(), pixelDensity.Get(), forcePow2.Get(),
scalableSVG.Get(), pixelsBorder.Get(), textureFilter.Get(),
allowChilds.Get() );
TexturePacker tp( width.Get(), height.Get(), PixelDensity::toFloat( pixelDensity.Get() ),
forcePow2.Get(), scalableSVG.Get(), pixelsBorder.Get(),
textureFilter.Get(), allowChilds.Get() );
std::cout << "Packing directory: " << texturesPathSafe << std::endl;
tp.addTexturesPath( texturesPathSafe );
for ( auto& image : imagesList ) {