In this section, we'll look how to load textures in our code and learn to apply these textures to our objects. Textures is an image which is used add detail to an object. Imagine object such as cube and if we apply wooden texture to it, then it will look like a wooden box in our game world.
For this section, our object will be a rectangle. So first we'll learn how to draw rectangle shape in OpenGL and then understand how to apply textures to it. To apply texture to the shape, we'll prefer when using SOIL library, which is the Simple OpenGL Image Library. If you wish, you can use other libraries such as libpng which, as the name suggests, just supports PNG format images. But in this section, we'll only learn about SOIL, actually about SOIL2.
SOIL is a cross-platform library and it's supported on Android and iOS...