Hi, I’m curently creating image viewing software using opengl/c++. This obviously involves loading a high number of textures into the program, when I use the code below the corrct image is loaded, however when I attempt to create a for loop in order to load several images, the initialization fails. I was just wondering if this was actually a constraint in openGL or is it my coding. The for loop I have been using is commented out in the code below.Any help would be much appreciated.
//Code for loading textures
int bi=0;
Status=TRUE;
//for(bi=0;bi>count-1;bi++){
TextureImage[bi] = LoadBMP(name);
glGenTextures(1, &texture[bi]);
glBindTexture(GL_TEXTURE_2D, texture[bi]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
gluBuild2DMipmaps(GL_TEXTURE_2D,3, TextureImage[bi]->sizeX, TextureImage[bi]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[bi]->data);
// }