OpenGL man pages
gluBuild2DMipmaps.3glNamegluBuild2DMipmaps - create 2-D mipmaps C Specificationint gluBuild2DMipmaps( GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data ) Parameterstarget Specifies the target texture. Must be GL_TEXTURE_2D. components Specifies the number of color components in the texture. Must be 1, 2, 3, or 4. width, height Specifies the width and height, respectively, of the texture image. format Specifies the format of the pixel data. Must be one of: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA. type Specifies the data type for data. Must be one of: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT. data Specifies a pointer to the image data in memory. DescriptiongluBuild2DMipmaps obtains the input image and generates all mipmap images (using gluScaleImage) so that the input image can be used as a mipmapped texture image. glTexImage2D is then called to load each of the images. If the dimensions of the input image are not powers of two, then the image is scaled so that both the width and height are powers of two before the mipmaps are generated. A return value of 0 indicates success. Otherwise, a GLU error code is returned (see gluErrorString). Please refer to the glTexImage1D reference page for a description of the acceptable values for the format parameter. See the glDrawPixels reference page for a description of the acceptable values for the type parameter. See AlsoglDrawPixels, glTexImage1D, glTexImage2D, gluBuild1DMipmaps, gluErrorString, gluScaleImage Introduction | Alphabetic | Specification Last Edited:
Fri Dec 6 11:18:03 EST 1996
by
AFV |