A texture is a bitmap image that gets applied to a surface through mapping. Rendering textures on the screen will be our first step in getting to know the Libgdx 2D graphics API. Once you learn a few simple operations with textures, you will be able to build relatively complex scenes for your games.
To illustrate the procedure, we are going to make use of a friendly caveman, who we will show at different positions, sizes, and orientations.
You need the
samples projects to follow this recipe, so make sure you already have them in your Eclipse workspace. You will find the caveman texture in
data/caveman.png, inside the
data folder in the Android project.
The code for this recipe is hosted ...