First we don’t know every tutor out there by heart, while nehe is a good resourse the first lessons are examples, just to show how to do something. But those first examples are limited in that maybe not the correct way to do something beyond what it demostrates.
I think the problem is that example is setup to load one texture and there is more to it then increasing the size of the texture array.
Maybe this will help:
TextureImage[0]; // is for storing the BMP file before it is loading into openGL’s texture memory space, so this is really a temp storage and you could use this same variable over and over.
GLuint texture[1]; // This is the real place the texture is going to be stored, currently has space for one texture.
glGenTextures(1, &texture[0]); // Here is where we create our texture space.
glBindTexture(GL_TEXTURE_2D, texture[0]); // What type of texture we are creating.
glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // Copy our image into the texture space.
To load multiple textures you would:
LoadBMP into TextureImage[0]
Create a texture space and copy the TextureImage into texture[?].
Clear the TextureImage, per example in NEHE’s code and load the next BMP file.
Keep repeating until all of the files needed have been loaded.
Note later NEHE goes go into loading multiple images, I forget which lesson.
I have code for loading multiple images for a file list, but I do not use the glaux library since it is for the windows only platform.
[This message has been edited by nexusone (edited 08-06-2003).]