Most typical computer games create a game window, and the details for doing this were demonstrated in the previous chapter. The game window is a standard window that can be full-screen or less; its purpose is to be a canvas upon which graphical data is drawn. Graphics are usually drawn onto the canvas in one large batch by the graphics card, and each time this process occurs it is said to be a frame.In order to maintain some smoothness and consistency between each frame to the human eye, frames need to occur many times per second. It is the job of the rendering loop to ensure this happens.
Naturally, one of the first tasks any game programmer has when setting out to create a game is to determine how to display elements such as fill colors and images on the screen. The previous chapter examined how the screen can be filled with a solid color. However, it is useful to display more complex data too; specifically, images from files such as JPEGs, TGAs, or PNGs. The next section examines this process.