texture width/height ratio

Hello,
I’ve spent most of last night trying to fix my rather simple program. I got to the point where I was creating a simple image (512x32,RGB,3 bytes/pixel) and then I was using it as a texture (gen texture, bind, tex image, etc.) to draw a rectangle.
It turned out that if ratio of width/height was less than 0.5 it wouldn’t display the texture. I know that both width and height must be powers of 2, but I didn’t know that the ratio of width and height was an issue as well. Is that really the case ? Or could it be something with my code ? I’m running Linux Debian XFree 4.2.0 with NVidia
drivers on NVidia GeForce 256 2 MX 400. (I don’t know if this is an OpenGL issue or drivers issue or other). I’d appreciate if someone could share his/her experiences on the subject (is anyone else having problems like that ?).
Regards,

Martin

This should work, it’s very probably a bug in your code.

Hello,
Thank you for your reply. I went through my code again and I found out that the behavior is rather random unless you provide this function call:
glTexEnvf(…,…,GL_REPLACE); It doesn’t have to be GL_REPLACE but the texture mode must be specified otherwise the texture is sometimes displayed and sometimes not, as if texture mode was in a random state. Don’t know why this happens, but it works ok now - that you for pointing in the direction of my code.

Martin