The pixels in the rectangle are processed exactly as if glCopyPixels had been called, but the process stops just before final conversion. Pixel ordering is such that lower x and y screen coordinates correspond to lower s and t texture coordinates.
Parameters target Specifies the target texture.
Level 0 is the base image level. Level n is the nth mipmap reduction image. The height of the texture image is 1. Must be either 0 or 1. The glCopyTexImage2D subroutine is available only if the GL version is 1.1 or greater.