-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement IRectanglePacker
interface and various packing algorithms
#5994
base: master
Are you sure you want to change the base?
Conversation
If performance is a perceived concern, I'd recommend adding benchmarks. They should be very simple to create, since we already have all the tooling in place. |
So I've added some benchmarks in which I'm creating and populating bins with 20 rectangles of various sizes. As you can see the difference is quite big. Basically we are trading performance for potential capacity (as expected, probably).
|
A step towards resolving #5986.
TextureAtlas
has been reworked to support newIRectanglePacker
interface, so switching the algorithm is a one line change. For now it's using the same algo as previously since I'm not sure about performance concerns (probably benchmarking needed).Also adds a nice test scene to play around with: