This computer graphics design and computer aided design site aims to provide free ebook on 3d computer graphics, opengl tutorial, opengl 3d, 3d design, vrml examples, vrml tutorials, xlib tutorial, adobe photoshop tutorial, illustrator, dreamweaver and coreldraw tutorial.

Search Within this Site for Ebooks

OpenGL Texture Mapping - Sample Chapter

After reading this chapter, you’ll be able to do the following:

  • Understand what texture mapping can add to your scene
  • Specify texture images in compressed and uncompressed formats
  • Control how a texture image is filtered as it is applied to a fragment
  • Create and manage texture images in texture objects and, if available, control a high-performance working set of those texture objects
  • Specify how the color values in the image combine with those of the fragment to which it’s being applied
  • Supply texture coordinates to indicate how the texture image should be aligned with the objects in your scene
  • Generate texture coordinates automatically to produce effects such as contour maps and environment maps
  • Perform complex texture operations in a single pass with multitexturing (sequential texture units)
  • Use texture combiner functions to mathematically operate on texture, fragment, and constant color values
  • After texturing, process fragments with secondary colors
  • Perform transformations on texture coordinates using the texture matrix
  • Render shadowed objects, using depth textures


So far, every geometric primitive has been drawn as either a solid color or smoothly shaded between the colors at its vertices—that is, they’ve been drawn without texture mapping. If you want to draw a large brick wall without texture mapping, for example, each brick must be drawn as a separate polygon. Without texturing, a large flat wall—which is really a single rectangle—might require thousands of individual bricks, and even then the bricks may appear too smooth and regular to be realistic.

Texture mapping allows you to glue an image of a brick wall (obtained, perhaps, by scanning in a photograph of a real wall) to a polygon and to draw the entire wall as a single polygon. Texture mapping ensures that all the right things happen as the polygon is transformed and rendered. For example, when the wall is viewed in perspective, the bricks may appear smaller as the wall gets farther from the viewpoint. Other uses for texture mapping include depicting vegetation on large polygons representing the ground in flight simulation; wallpaper patterns; and textures that make polygons look like natural substances such as marble, wood, and cloth. The possibilities are endless. Although it’s most natural to think of applying textures to polygons, textures can be applied to all primitives—points, lines, polygons, bitmaps, and images. Plates 6, 8, 18–21, and 24–32 all demonstrate the use of textures.

Click to Download

Disclaimer
Copyright of books and articles goes to its respective owners. In this blog, i am writing reviews about articles & books and giving free links available in world wide web. Intention of this blog is educative purpose and using contents from other sites as it is fair use. So if you have any complaints regarding books copyright, please contact book hosting servers for the removal of the book. we got all download links from the search engines and so we are not responsible for any damage due to the links given here. This is only for education purpose.
Privacy Policy
We use third-party advertising companies to serve ads when you visit our website. They uses cookies to serve ads on our site. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here