Fixed first atlas layer being resized to zero

Former-commit-id: f38c09255df40d62ddfa943cbd89353ff9a18cd0
This commit is contained in:
Lynix 2015-01-17 23:03:50 +01:00
parent f9345dc5fe
commit e495c1094a
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ bool NzGuillotineImageAtlas::Insert(const NzImage& image, NzRectui* rect, bool*
{
// Dernière couche, et le glyphe ne rentre pas, peut-on agrandir la taille de l'image ?
NzVector2ui newSize = layer.binPack.GetSize()*2;
if (newSize == NzVector2ui::Zero())
newSize.Set(s_atlasStartSize);
if (ResizeLayer(layer, newSize))
{
// Oui on peut !