Sometimes a one-dimensional texture is sufficient - for example, if you're drawing textured bands where all the variation is in one direction. A one-dimensional texture behaves like a two-dimensional one with height = 1, and without borders along the top and bottom. To specify a one-dimensional texture, use glTexImage1D(). void glTexImage1D(GLenum target, GLint level, GLint components, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
Defines a one-dimensional texture. All the parameters have the same meanings as for glTexImage2D(), except that the image is now a one-dimensional array of texels. As before, the value of width must be a power of 2 (2m, or 2m+2 if there's a border). You can supply mipmaps, and the same filtering options are available as well.
For a sample program that uses a one-dimensional texture map, see Example 9-3 .
OpenGL Programming Guide