I found this thread a few weeks ago, after skim reading the PDF in the answer, and toying around with the authors code, I did a re-write which more suited my needs ( texture atlas packing )
If anyone else is interested...
https://github.com/chris-stones/BinPack2D
- Allow user to bundle a data-structure with submitted rectangles ( orig file name, etc )
- Pack multiple bins ( for 2d texture atlas array - GL_EXT_texture_array )
Also, Instead of tracking splitting and joining free rectangles, I track and sort free top left corners. I found it much simpler to implement, with equally good results.
There is no documentation, See ExampleProgram() at the top of the header file.