March 13, 2010

(0) Comments

Rectangle Packing is Hard! Part 1

Rectangle packing, or 2D box packing (or bin packing), is a pretty common problem in computer graphics. Plasma needs a good rectangle packer because most GL ES hardware only supports textures with sides that are powers of 2, and this isn’t an acceptable limitation. Our current solution is to pack all bitmaps into one big texture which meets any hardware requirements. Then we can just draw the parts of the texture that the frame requires.

So, how can we efficiently pack a bunch of bitmaps into one big image?

More »