The gluBuild2DMipmaps function creates 2-D mipmaps.
int gluBuild2DMipmaps(
GLenum target,
GLint components,
GLint width,
GLint height,
GLenum format,
GLenum type,
const void * data
);
The gluBuild2DMipmaps function obtains the input image and generates all mipmap images (using gluScaleImage) so the input image can be used as a mipmapped texture image. To load each of the images, call glTexImage2D. 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 zero indicates success. Otherwise, a GLU error code is returned (see gluErrorString).
For a description of the acceptable values for the format parameter, see glTexImage2D. For a description of the acceptable values for type, see glDrawPixels.
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in glu.h.
Import Library: Link with glu32.lib.
glDrawPixels, glTexImage2D, gluBuild1DMipmaps, gluScaleImage