PDA

View Full Version : texture width/height ratio



Martin_unique
04-22-2003, 05:11 AM
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

Obli
04-24-2003, 11:05 AM
I never heard of a limitation about texture ratio and this really worries me!

Are you sure everything is in place?

Pixelformat (in *nix I guess it is called framebuffer format) in RGBA?
Correctly declared texture?
- Got a texture name?
- Set up the data correctly?
- Are you asking for trilinear filtering / mipmapped bilinear? If so, have you defined mipmaps?
- Are you sure you declared the internal texture format correctly?
- Texture target enabled? Current / not overriden?
- Are you sure the texture is loaded in memory correctly?

Can you give me more infos on this? It's quite worrying to me!

[This message has been edited by Obli (edited 04-24-2003).]