OpenGL Super Bible! (Dedicated web hosting) Page 397 Chapter 11 Raster

OpenGL Super Bible! Page 397 Chapter 11 Raster Graphics in OpenGL What you ll learn in this chapter: How to Functions You ll Use Draw bitmap images glBitmap/glRasterPos Use bitmap fonts wglUseFontBitmaps/glGenLists/glCallLists Draw color images glDrawPixels Read and copy color images on the screen glCopyPixels/glReadPixels Read and write Windows bitmap files LoadDIBitmap/SaveDIBitmap You ve probably heard a lot of sales hype lately about how much better it is to work with 3D graphics than with those old 2D graphics from years ago. While this is true for the most part, ultimately those 3D graphics are drawn in two dimensions on your screen. Raster graphics are two-dimensional arrays of colors and are used not only for displaying 3D graphics on the screen but also for printing images on raster printers or motion-picture film In addition to the vector and polygon functions we ve examined so far, OpenGL provides several functions that directly manage 2D bitmaps and images. Those functions are the subject of this chapter. Drawing Bitmaps Bitmaps in OpenGL are two-color images that are used to quickly draw characters or symbols (such as icons) on the screen. This diverges from the (incorrect) Microsoft Windows definition that includes multicolored images, as well. OpenGL provides a single function to draw bitmaps: glBitmap. When you draw a bitmap with glBitmap, the first color (0) is transparent. The second color (1) is drawn using the current color and lighting material attributes. Figure 11-1 shows an OpenGL bitmap image of smiley faces. The code (Listing 11-1) to draw this window consists of the bitmap data followed by a call to glBitmap.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply