Level 0 is a copy of data . 64x16x32, 32x8x16, 16x4x8, 8x2x4, 4x1x2, 2x1x1 and 1x1x1. 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 . First, query for the width, height and depth actually used at level 0.