   texture loader
AUX_RGBImageRec *LoadBMP(char *Filename)// Loads A Bitmap Image{FILE *File=NULL;// File Handleif (!Filename)// Make Sure A Filename Was Given{return NULL;// If Not Return NULL}File=fopen(Filename,"r");// Check To See If The File Existsif (File)// Does The File Exist?{fclose(File);// Close The Handlereturn auxDIBImageLoad(Filename);// Load The Bitmap And Return A Pointer}return NULL;// If Load Failed Return NULL}int LoadGLTextures()// Load Bitmaps And Convert To Textures{AUX_RGBImageRec *TextureImage[1];// Create Storage Space For The Texturememset(TextureImage,0,sizeof(void *)*1);// Set The Pointer To NULL// Load The Bitmap, Check For Errors, If Bitmap's Not Found Quitif (TextureImage[0]=LoadBMP("wall.bmp")){glGenTextures(1, &texture[0]);// Create The Texture// Typical Texture Generation Using Data From The BitmapglBindTexture(GL_TEXTURE_2D, texture[0]);// Generate The TextureglTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);// Linear FilteringglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);// Linear Filtering}if (TextureImage[0])// If Texture Exists{if (TextureImage[0]->data)// If Texture Image Exists{free(TextureImage[0]->data);// Free The Texture Image Memory}free(TextureImage[0]);// Free The Image Structure}}I found this code for texture loader in NeHe's tutorial. How do i load more than one texture using this code?   
  Its been a while since i did the NeHe stuff but if i remember rightly you need to look at the texture[0], where it calls glBindTexture(GL_TEXTURE_2D, texture[0]);.That call along with the glGenTextures() call stores the data or at least a reference to how to get it in texture[0]. Look to see where else texture[0] is used, noteing how its used in rendering.From that you should realise that you can have a member variable that holds the texture information. Just replace the texture[0] in that code. Obvioulsy the may need changing, i think if you return texture[0] then that is a reference to the data you need.I'm just working from memory here so you should probably wait til someone confirms the above.   ;  In simple terms, you need to wrap a loop around the loading code, and change the creation of the TextureImage array toAUX_RGBImageRec *TextureImage[n];memset(TextureImage,0,sizeof(void *)*n);(That void* should be AUX_RGBImageRec* imho, but it will probably work the same.)Put a for(int i = 0; i < n; i++){ ... } around the rest of the function, and replace [0] with  throughout.You will also need to adjust the definition of texture (not in your snippet) to allow for more than one entry. And changing 'wall.bmp' to be a parameter would make more sense ;). I would pass in an array of strings, calculate n as the length of that array and use textureNames there.