Texture error

I was using a 256x256x256 bmp texture to map on a square and it works great.
But I have just tried with another texture (its size is not 256x256, but something like 300x200) and it doesn’t work.
Why? Because the texture is not a square ?
I’m using a LoadBmp function like the Nehe one.

Thanks

OpenGL-textures always have to have dimensions that are a power of 2 (there is an extension that can handle other dimensions, but you’re safer with sizes like 64x64, 128x128, 256x256, 512x512…)

One small note however, they do not have to be square, e.g. 64 x 256 is perfectly ok.

thanks