
Color values can have up to four components: R, G, B and A. Pixels of the client data can be color values, depth values, combined depth/stencil values, or just stencil values. They also do not completely describe the pixel format in client memory (see #Pixel transfer parameters for more on that). These do not refer to the internal format of the texture object (in the case of glTexImage* calls). The format and type parameters describe the format of a single pixel. For ease of discussion, let us call this "client memory" regardless of whether it refers to a buffer object or not. The switch for this is based on whether a buffer object is bound to the GL_PIXEL_PACK/UNPACK_BUFFER binding, depending on whether the pixel transfer is a pack or unpack operation. The data pointer is either a client memory pointer or an offset into a buffer object. GLenum format, GLenum type, void * data With the exception of the compressed texture functions, all functions that initiate pixel transfers take 3 parameters: The discussion below will ignore the compressed texture functions, since none of what is discussed pertains to them. glGetCompressedTexImage: Reads all of the compressed texture data into the user's memory.glCompressedTexSubImage*: Writes compressed data to some part of the given mipmap level.glCompressedTexImage*: Allocates mutable storage for a mipmap level of a texture that uses a compressed image format and writes compressed data to that mipmap level.But they are listed here because they can use pixel buffers for reading and writing. These are not technically pixel transfer operations, as they do nothing more than copy memory to/from compressed textures. There are also special pixel transfer commands for compressed image formats. glTexSubImage*: Writes the user's pixel data to some part of the given mipmap of the bound texture object.glTexImage*: Allocates mutable storage for a mipmap level of the bound texture object and optionally writes pixel data to that mipmap level.Pixel unpack operations (ie: transfers from the user to OpenGL): glGetTexImage: Reads all of the pixels from a mipmap level of the bound texture object.If this is a color read, then it reads from the buffer designated by glReadBuffer. glReadPixels: Reads pixel data from the currently bound framebuffer object or the default framebuffer.Pixel pack operations (ie: transfers from OpenGL to the user): There are a number of OpenGL functions that initiate a pixel transfer operation. Therefore, transfers to OpenGL memory are called unpack operations, and transfers from OpenGL memory are called pack operations. Pixel data in user memory is said to be packed.

Pixel transfers can either go from user memory to OpenGL memory, or from OpenGL memory to user memory (the user memory can be client memory or buffer objects).
