glGenerateMipmap

glGenerateMipmap: man4/glGenerateMipmap.xml

glGenerateMipmap and glGenerateTextureMipmap generates mipmaps for the specified texture object. For glGenerateMipmap, the texture object is that bound to to target. For glGenerateTextureMipmap, texture is the name of the texture object. For cube map and cube map array textures, the texture object must be cube complete or cube array complete respectively. Mipmap generation replaces texel image levels $level_{base} + 1$ through $q$ with images derived from the $level_{base}$ image, regardless of their previous contents. All other mimap images, including the $level_{base}+1$ image, are left unchanged by this computation. The internal formats of the derived mipmap images all match those of the $level_{base}$ image. The contents of the derived images are computed by repeated, filtered reduction of the $level_{base} + 1$ image. For one- and two-dimensional array and cube map array textures, each layer is filtered independently.

Cube map array textures are accepted only if the GL version is 4.0 or higher.

@OpenGL_Version(OGLIntroducedIn.V3P0)
@OpenGL_Extension("GL_ARB_framebuffer_object")
fn_glGenerateMipmap glGenerateMipmap;

See Also

glTexImage2D, glBindTexture, glGenTextures

Meta