Want to pack loads of images into one large texture, without
wading through loads of academic bin-packing papers?
So did I, so I implemented the algorithm from this page
. It's not terribly clever, but it is quick and easy.
Just throw an item with width and height dimensions at it, and it's return a rectangle in which the item can reside. Later you can delete the item, and the space will be returned to usable, barring fragmentation.
The only import is java.util.List, and even that's only for visualisation in the test app. Find the code here
Free to a good home etc...