3D Graphics with OpenGL ES and M3G- P23:Mobile phones are the new vehicle for bringing interactive graphics technologies to consumers. Graphics that in the 1980s was only seen in industrial flight simulators and at the turn of the millennium in desktop PCs and game consoles is now in the hands of billions of people. This book is about the technology underpinnings of mobile threedimensional graphics, the newest and most rapidly advancing area of computer graphics. | 204 OPENGL ES RASTERIZATION AND FRAGMENT PROCESSING CHAPTER 9 Pitfall Implementations may free the automatically generated mipmap levels when GL_GENERATE_MIPMAP is disabled to save memory. Toggling this parameter on off may slow down rendering considerably. The mipmap levels of compressed textures are specified in yet another way. They cannot be generated automatically and with paletted textures all levels have to be given at once. The level argument of glCompressedTexImage2D is 0 if only the base level is given whereas a negative number tells how many mipmap levels are given in the data argument. For example for a texture map where the base is 64 x 32 levels must be -6. The example on page 202 illustrates this concept. More generally the extension specification states for a given texture compression format how the mipmap levels are handled. Mipmap filtering modes There are several additional filtering modes available for mipmapping and they are set with glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_X_MIPMAP_Y where you replace X and Y with either NEAREST or LINEAR. Specifying X to be NEAREST means that within one mipmap level point sampling will be used whereas LINEAR means that the texel values will be interpolated. Specifying Y selects interpolation across mipmap levels NEAREST means that only the mipmap level where texels most closely match the pixel size is selected while LINEAR means that two closest-matching mipmap levels are chosen and evaluated separately using the X setting and the results are finally linearly interpolated. To clarify glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_LINEAR would perform a full tri-linear filtering whereas glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR_MIPMAP_NEAREST would just take the closest mipmap level and perform a bilinear filtering on that. Depending on the mode either 1 2 4 or 8 texels will be averaged together. Recall that mipmapping relates only to minification as .