The earliest framebuffers were simply mapped into host memory. To render, applications addressed the framebuffer like any normal block of memory and stored final color values at pixel locations within the framebuffer (Sproul 1979). As graphics hardware evolved, providing efficient direct access to the framebuffer became increasingly difficult, and many graphics hardware manufacturers stopped providing memory-mapped framebuffer access altogether. To support hardware that can't be memory mapped, OpenGL allows reading, writing, and copying pixel rectangles in the framebuffer. Chapter 6, "Texture Mapping," describes a much more powerful use for pixel data than simply copying it to the framebuffer. This chapter serves as an introduction to texture mapping, because OpenGL uses the same pixel pipeline to process textures as it does to process pixel rectangles. What You'll LearnThis chapter covers the basics of drawing, reading, and copying pixel rectangles:
What You Won't LearnOpenGL provides a powerful set of commands for processing pixel data. Applications use OpenGL to display and store pixel data in a wide variety of formats, as well as share pixel data between big- and little-endian machines. Most of these commands are outside the scope of this chapter, which focuses on the task of displaying, copying, and reading back pixel data as RGBA unsigned bytes. The capabilities of OpenGL not covered in this chapter include
For more information on pixel rectangles, bitmaps, and pixel operations, see Chapter 8, "Drawing Pixels, Bitmaps, Fonts, and Images," of OpenGL® Programming Guide and Section 4.3, "Drawing, Reading, and Copying Pixels," of The OpenGL Graphics System. |