Sex offenders web site - OpenGL Super Bible! Page 445 If you use

OpenGL Super Bible! Page 445 If you use GL_REPEAT instead, the texture image is tiled over the polygon. Texture coordinates are used modulo 1.0 that is, the texture image repeats at regular intervals. GL_REPEAT texturing can be used to reduce the size of texture images on repetitive surfaces. The challenge with these kinds of textures is to make the edges of each tile blend into the next. Automatically Generating Texture Coordinates: Generating texture coordinates can be a tedious task. Later in this chapter you ll learn about the glTexGen functions that can generate these coordinates automatically for you. Mipmapped Textures So far, we ve dealt exclusively with single-texture images. That is, whenever we draw a textured polygon, the polygon is painted with a single 1D or 2D image. This is fine for some scenes, but animated displays often need various levels of detail depending on the distance from the viewer. For example, when walking through a virtual room, you might want a high- resolution image of a picture close up, but only the outline at a distance. OpenGL supports textures with multiple images, called mipmapped textures. Mipmapping selects the texture image closest to the screen resolution for a polygon. Loading mipmapped textures takes slightly longer than standard textures, but the visual results are impressive. In addition, mipmapped textures can improve display performance by reducing the need for GL_LINEAR image filters. What Does the ‘Mip in ‘Mipmapped Mean?: ‘mip is latin for ‘many . ‘Mipmapping means ‘many images . Mipmapped textures are defined by providing a specific level parameter for each image. For the ROY-G-BIV texture in the previous example, you would use the following: static unsigned char roygbiv_image0[16][3]; static unsigned char roygbiv_image1[8][3]; static unsigned char roygbiv_image2[4][3]; static unsigned char roygbiv_image3[2][3]; static unsigned char roygbiv_image4[1][3]; glNewList(RainbowTexture = glGenLists(1), GL_COMPILE); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply