1. void glGenerateMipmap( GLenum target);
    2. // 为target 生成mipmaps(多级纹理)
    3. // target: 可能值如下:
    4. // GL_TEXTURE_1D,
    5. // GL_TEXTURE_2D,
    6. // GL_TEXTURE_3D,
    7. // GL_TEXTURE_1D_ARRAY,
    8. // GL_TEXTURE_2D_ARRAY
    9. // GL_TEXTURE_CUBE_MAP.

    GL_INVALID_ENUM is generated if target is not one of the accepted texture targets.
    GL_INVALID_OPERATION is generated if target is GL_TEXTURE_CUBE_MAP and the texture bound to the GL_TEXTURE_CUBE_MAP target of the active texture unit is not cube complete.