Giter Club home page Giter Club logo

texture-atlas's People

Watchers

 avatar

texture-atlas's Issues

reset bug fix

I've added the line:

    mFreeList = 0;

to the end of the reset() function. This ensures a clean reset if, like 
me, you are calling packtextures() multiple times to figure out optimal 
tpage sizes.


Original issue reported on code.google.com by [email protected] on 23 May 2010 at 9:54

Assertion failure in bestFit, line 387

What steps will reproduce the problem?

---
TexturePacker::setTextureCount(63)

TexturePacker::addTexture(16,30)
TexturePacker::addTexture(16,30)
TexturePacker::addTexture(14,24)
TexturePacker::addTexture(18,21)
TexturePacker::addTexture(17,26)
TexturePacker::addTexture(25,25)
TexturePacker::addTexture(21,24)
TexturePacker::addTexture(14,29)
TexturePacker::addTexture(14,29)
TexturePacker::addTexture(16,17)
TexturePacker::addTexture(17,15)
TexturePacker::addTexture(11,14)
TexturePacker::addTexture(14,10)
TexturePacker::addTexture(12,10)
TexturePacker::addTexture(17,28)
TexturePacker::addTexture(20,24)
TexturePacker::addTexture(15,24)
TexturePacker::addTexture(17,24)
TexturePacker::addTexture(18,24)
TexturePacker::addTexture(21,24)
TexturePacker::addTexture(18,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(12,18)
TexturePacker::addTexture(12,22)
TexturePacker::addTexture(14,16)
TexturePacker::addTexture(16,14)
TexturePacker::addTexture(14,16)
TexturePacker::addTexture(17,24)
TexturePacker::addTexture(24,24)
TexturePacker::addTexture(22,25)
TexturePacker::addTexture(22,24)
TexturePacker::addTexture(20,24)
TexturePacker::addTexture(23,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(23,24)
TexturePacker::addTexture(25,24)
TexturePacker::addTexture(15,24)
TexturePacker::addTexture(17,24)
TexturePacker::addTexture(24,25)
TexturePacker::addTexture(19,24)
TexturePacker::addTexture(26,24)
TexturePacker::addTexture(21,24)
TexturePacker::addTexture(23,24)
TexturePacker::addTexture(22,24)
TexturePacker::addTexture(23,27)
TexturePacker::addTexture(22,25)
TexturePacker::addTexture(18,24)
TexturePacker::addTexture(21,24)
TexturePacker::addTexture(23,24)
TexturePacker::addTexture(22,24)
TexturePacker::addTexture(31,24)
TexturePacker::addTexture(24,24)
TexturePacker::addTexture(23,24)
TexturePacker::addTexture(21,24)
TexturePacker::addTexture(15,30)
TexturePacker::addTexture(17,28)
TexturePacker::addTexture(16,30)
TexturePacker::addTexture(16,13)
TexturePacker::addTexture(18,9)

TexturePacker::packTextures(width, height, width, true, false)

Assertion failed: bestFit, file 
c:\development\workspace\pixcombo\texturepacker.cpp, line 387

---


What is the expected output? What do you see instead?

---
No assertion

---

What version of the product are you using? On what operating system?

---
Product Version: svn checkout (revision 3)
OS: Windows Vista 
Compiler: Visual Studio 2008

---

Please provide any additional information below.

---
Everything compiles without warnings, using different texture-sets does in 
some cases avoid the assertion. Hence my assumption that it is connected 
to my texture-dimensions.

Playing around with the code a little allowed me to get my textures packed 
pretty well using texture-atlas. 
I changed one line in packTextures:
==old==
    width  = mLongestEdge;              // The width is no more than the 
longest edge of any rectangle passed in
=======
==hacked==
    width  = 2*mLongestEdge;              // The width is no more than the 
longest edge of any rectangle passed in
=======
Still I am not sure if this is a robust fix and not just a nasty, 
temporary and very case-sensitive hack.

Original issue reported on code.google.com by [email protected] on 18 Feb 2010 at 2:10

Possible errors lines 178 and 184

Not sure about this, but,
line 178:
else if ( r1.mY1 == r2.mY1 && r1.mY2 == r2.mY1 && r1.mX1 == r2.mX2 ) // if we 
share the left edge
Why not
else if ( r1.mY1 == r2.mY1 && r1.mY2 == r2.mY2 && r1.mX1 == r2.mX2 )
instead?

Same thing line 184.

Original issue reported on code.google.com by [email protected] on 7 Nov 2011 at 1:34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.