Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Texture mapping inaccuracy

  1. #1
    Member Regular Contributor
    Join Date
    Sep 2002
    Posts
    384

    Texture mapping inaccuracy

    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.

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2005
    Location
    Manchester, UK
    Posts
    7

    Re: Texture mapping inaccuracy

    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

  3. #3
    Member Regular Contributor
    Join Date
    Sep 2002
    Posts
    384

    Re: Texture mapping inaccuracy

    I am using GL_NEAREST because I want non-blurred images.

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •