With texture mapping, you can take a real picture of a missile and make the picture fly across the screen. By using texture mapping, not only will it look better, but your program will run faster. The texture mapped missile would only be one quad moving across the screen. A missile made out of polygons could be made up of hundreds or thousands of polygons. The single texture mapped quad will use alot less processing power.
Lets start off by adding five new lines of code to the top of lesson one.
Adding this header file allows us to work with files. These variables will be used to rotate the cube on the x axis, the y axis, and the z axis. If you wanted to load in more than one texture, you would change the number one to the number of textures you wish to load. The job of this code is to load in a bitmap file. If the file doesn't exist NULL is sent back meaning the texture couldn't be loaded.