Texture Coordinates/speed concerns.

Situation: You have a quad and you want to use an entire texture map on it, so you specify coordinates using integers, like so:


And what happens is that a border is drawn around the edges of the quad! You can solve this problem by using floats and using 0.01 and 0.99 instead of 0’s and 1’s, but wouldn’t that be slower?

No, it’s not any slower. Those ints get converted into floats internally anyway.

Actually, as I think about it, I’m wondering if it your code as written even works. I thought that when you use ints, it assumes that MAX_INT is 1.0 and MIN_INT is -1.0.

[This message has been edited by Korval (edited 12-16-2001).]

Your code is correct and no border should be drawn if you didn’t load one with glTexImage2D.