15.6 Graphics Rendering


15.6 Graphics Rendering

The process of drawing an image, such as a game character, to the window is part of a graphics pipeline. It's called a pipeline due to the systematic method by which any number of images may be processed, one by one, and then drawn to the display as quickly as the hardware will allow. It's like having two cards, A at the front and B behind. The player can only see card A, and everything seen on the screen will appear on card A; this is called the front buffer.As UpdateFrames() is called, new data is drawn to card B, although it is not yet visible to the player. When the frame is completed, the cards are switched so card B (with new data) becomes visible and is therefore the front buffer, and card A moves to the back and becomes the back buffer. New data is always drawn to the back buffer, and only the front buffer is visible to the player at any one time, and then the cards are flipped at the end of each frame. This process is called page flipping. In general, this is how most computer games work, whether 2D or 3D, and it is the method ClanLib uses and in turn is the method used by DirectX and OpenGL. The next chapter explains how graphical data like still images can be drawn to the display using this method.




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

Similar book on Amazon
Beginning C++ Through Game Programming
Beginning C++ Through Game Programming
Beginning Game Programming
Beginning Game Programming
The Ultimate Guide to Video Game Writing and Design
The Ultimate Guide to Video Game Writing and Design

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net