At each level, each texel in the halved mipmap level is an average of the corresponding four texels in the larger mipmap level. Level 0 is a copy of data . These correspond to levels 0 through 6, respectively. See the glTexImage1D subroutine for a description of the acceptable values for format parameter. See the glDrawPixels subroutine for a description of the acceptable values for type parameter.
Parameters target Specifies the target texture.
There is no direct way of querying the maximum level. This can be derived indirectly via glGetTexLevelParameter . The glDrawPixels subroutine, glTexImage1D subroutine, glTexImage2D subroutine, glTexImage3D subroutine, gluBuild1DMipmaps subroutine, gluBuild3DMipmaps subroutine, gluErrorString subroutine, glGetTexImage subroutine, glGetTexLevelParameter subroutine, gluBuild1DMipmapLevels subroutine, gluBuild2DMipmapLevels subroutine, gluBuild3DMipmapLevels subroutine . OpenGL Overview .