Here’s a snip of my code:
glGenTextures(1, &texture); // Get the First Free Name to use for the Font Texture
glBindTexture(GL_TEXTURE_2D, texture); // Actually create the texture object
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,MagFilter); // parameters...
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,MinFilter);
//#if defined(__sgi)
//glTexImage2D(GL_TEXTURE_2D, 0, 3, image1->width , image1->height , 0, GL_RGB, GL_UNSIGNED_BYTE, image1->data); // load the image data into the object
//#else
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, image1->width, image1->height, GL_RGB, GL_UNSIGNED_BYTE, image1->data);
//#endif
If I’m running this on a PC and I use gluBuild2DMipmaps function, all of my 20-some textures are fine.
If I’m running this on a PC and I use glTexImage2D function, it only loads certain 3 textures, and no others.
If I’m running this on an SGI (Irix) machine and I use glTexImage2D function, it only loads the same certain 3 textures, and no others.
If I’m running this on an SGI (Irix) machine and I use gluBuild2DMipmaps function, it crashes somewhere in the glu library because of a division by 0 error.
Any ideas what’s going on here?