Fixed glTexImage2D parameter. GL_RGB or GL_RGBA depending on the source image.