O'Reilly logo

Beginning Android 4 Games Development by Robert Green, Mario Zechner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Texture Atlas: Because Sharing Is Caring

Up until this point, you have only used a single texture in your programs. What if you not only want to render Bob, but other superheroes, enemies, explosions, or coins as well? You could have multiple textures, each holding the image of one object type. But OpenGL ES wouldn't like that too much, since you' d need to switch textures for every object type you render (that is, bind Bob's texture, render Bobs, bind the coin texture, render coins, and so on). You can do it more effectively by putting multiple images into a single texture. And that's a texture atlas: a single texture containing multiple images. You only need to bind that texture once, and you can then render any entity types for which there ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required