I always use the glTexImage2D() or gluBuild2DMipmaps() functions to generate textures. You just have to handle loading the image and converting it into a format these functions can use is all. This is really the only way I know of doing it, so it's the only way I can recommend.