The idea is that you have all of your individual sprite images combined into a single, larger image (the "atlas" or "sprite sheet"). So there is only a single image used to do all of the drawing. For each sprite that you want to draw:
- tex[i] defines where the data for that sprite is, within the image. So (for example), if you had 4 32x32 sprites for different types of characters in a single 64x64 image, each entry of tex would be one of: { 0, 0, 32, 32 }, { 32, 0, 64, 32 }, { 0, 32, 32, 64 }, { 32, 32, 64, 64 }.
- xform[i] defines how that sprite is transformed (rotated, scaled, and translated) when placed in the destination