texture mapping

Hi all, when I try to map this texture Im getting just a white box as if to show texture not found. the image is in the same directory as the cpp files and project. can anyone please tell me what Im doing wrong?

if (TextureImage[0]=LoadBMP(“test.bmp”))
{
Status=TRUE; // Set The Status To TRUE

            glGenTextures(3, &texture[0]);          // Create Three Textures

			// Create Nearest Filtered Texture
			glBindTexture(GL_TEXTURE_2D, texture[0]);
			glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
			glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
			glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

            // Create Linear Filtered Texture
            glBindTexture(GL_TEXTURE_2D, texture[1]);
            glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
            glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
            glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);

			// Create MipMapped Texture
			glBindTexture(GL_TEXTURE_2D, texture[2]);
			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[0]->sizeX, TextureImage[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data);
    }

Can you ensure in LoadBMP that the function can access the file you enter in argument ?

Notes: if you don’t stipple and directory for your texture, the program will expect to find it in the same directory where it resides (where you click on the exe).

yea I have the file in the same directory its odd cause when I use a different bitmap file it works no problem. its just when I changed the bitmap file now it just gives a white background.

are you sure the image you are using is a power of two dimension?

yea thats what it is it works fine now I resized it to 256*256 thanks for that. I have a new problem now though lol. I want to soomth the image so that I dont see the edges any idea how I can do this?

I’m assuming you rendered the image as a texture mapped quad. Are the edges you are talking about the aliased edges of the quad (this has nothing to do with the image).

You can enable multisampling in recent graphics cards to deal with this problem. This can sometimes be turned on using the driver application (usually embeded in the display adapter properties dialog) or can be forced on in your application using the GL_MULTISAMPLE_ARB extension.

ok how do I use GL_MULTISAMPLE_ARB? where in the code should I declare this for use and then use it? can u give me an example?

here is a demo from NeHe on using the extension:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=46