Click or drag to resize

TextureGenerateMipmap Method

Generate a complete set of mipmaps for this texture object.

Namespace:  Ooogles
Assembly:  Ooogles (in Ooogles.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void GenerateMipmap()
Exceptions
ExceptionCondition
GLExceptionInvalidOperation if this is a cube map texture, but its six faces do not share indentical widths, heights, formats, and types.
GLExceptionInvalidOperation if either the width or height of the zero level array is not a power of two.
GLExceptionInvalidOperation if the zero level array is stored in a compressed internal format.
Remarks
Computes a complete set of mipmap arrays derived from the zero level array. Array levels up to and including the 1x1 dimension texture image are replaced with the derived arrays, regardless of previous contents. The zero level texture image is left unchanged.

The internal formats of the derived mipmap arrays all match those of the zero level texture image. The dimensions of the derived arrays are computed by halving the width and height of the zero level texture image, then in turn halving the dimensions of each array level until the 1x1 dimension texture image is reached.

The contents of the derived arrays are computed by repeated filtered reduction of the zero level array. No particular filter algorithm is required, though a box filter is recommended. MipmapHint may be called to express a preference for speed or quality of filtering.

Note: in DEBUG mode with assertions enabled, an error will be logged to the debug console if this texture is not bound.

OpenGL API: glGenerateMipmap

See Also