Well, i am displaying various textures in 2D format. It's working great except for some images that are bugging in the display. I-m guessing this is because the image sizes are not 32*64 or so... check the screenie

And .. here's the texture code.
int LoadTexture(char *path)
{
AUX_RGBImageRec *TextureImage;
// Create storage space for the texture
if (TextureImage = LoadBMP(path)) {
// Create mipmapped texture
glBindTexture(GL_TEXTURE_2D, numtextura);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TextureImage->sizeX, TextureImage->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage->data);
}
else return -1;
if (TextureImage) {
if (TextureImage->data)
free(TextureImage->data);
free(TextureImage);
}
numtextura++;
return numtextura-1;
}
[edited by - skullfire on June 29, 2003 3:22:30 PM]