PDA

View Full Version : Texture mapping inaccuracy



halo
08-31-2005, 09:17 AM
I got it so I can draw quads on the screen with pixel-perfect accuracy. However, I have a problem mapping textures onto the quads with pixel-perfect accuracy. I use the texture mapping coordinates 0.0 and 1.0, but the texture is offset by one pixel in the y direction. The texture is using GL_NEAREST for the min and mag filters.

a_wolly
08-31-2005, 02:15 PM
Hi there,

Try using GL_LINEAR insteaad of GL_NEAREST for your min and max mag filtering though I can't see why that would make any difference. Also, check the texture itself - it may sound stupid but maybe the opaque part of the texture(s) doesn't cover the entire pixel area

Andy

halo
08-31-2005, 06:44 PM
I am using GL_NEAREST because I want non-blurred images.

Strangly, I flipped the pixels and the texture coordinates, and now it works.