GLGENERATEMIPMAP(3G)

    .SH "NAME" glGenerateMipmap - generate mipmaps for a specified texture target
    .SH "C SPECIFICATION"

            .HP u void glGenerateMipmap(GLenum target);

    .SH "PARAMETERS"

        .PP target

                    Specifies the target to which the texture whose mimaps to generate is bound. target must be GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_CUBE_MAP or GL_TEXTURE_CUBE_MAP_ARRAY.

            .RE

        .SH "DESCRIPTION"
            .PP glGenerateMipmap generates mipmaps for the texture attached to target of the active texture unit. For cube map or cube map array textures, a GL_INVALID_OPERATION error is generated if the texture attached to target is not cube or cube array complete.
            .PP Mipmap generation replaces texel array levels level base + 1 through q with arrays derived from the level base array, regardless of their previous contents. All other mimap arrays, including the level base array, are left unchanged by this computation.
            .PP The internal formats of the derived mipmap arrays all match those of the level base array. The contents of the derived arrays are computed by repeated, filtered reduction of the level base array. For two-dimensional array and cube map array textures, each layer is filtered independently.

        .SH "ERRORS"
            .PP GL_INVALID_ENUM is generated if target is not one of the accepted texture targets.
            .PP GL_INVALID_OPERATION is generated if target is GL_TEXTURE_CUBE_MAP or GL_TEXTURE_CUBE_MAP_ARRAY and the texture bound to target is not cube or cube array complete.
            .PP GL_INVALID_OPERATION is generated if the level base array is stored in a compressed internal format.
            .PP GL_INVALID_OPERATION is generated if the level base array was not specified with an unsized internal format or a sized internal format that is both color-renderable and texture-filterable.

        .SH "API VERSION SUPPORT"

            .TS allbox tab(:); l l l l l. T{ glGenerateMipmap T}:T{ T}:T{ T}:T{ T}:T{ T}

        .SH "SEE ALSO"
            .PP glTexImage2D(), glBindTexture(), glGenTextures()

        .SH "COPYRIGHT"
            .PP Copyright © 2010-2015 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2010-2015 Khronos Group