Creating the texture atlases

Before we start creating a texture atlas, let's first find out what this technique is actually good for. A texture atlas (also known as a sprite sheet) is just an ordinary image file that can be rendered to the screen like any other image. So what makes it so special? It is used as a container image that holds several smaller subimages arranged in such a way that they do not overlap each other and it still fits into the size of the texture atlas. This way, we can greatly reduce the amount of textures that are sent to the graphics processor, which will significantly improve the overall render performance. The texture atlases are especially useful for games where a lot of small and different images are rendered at once. ...

Get Learning LibGDX Game Development - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.