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 2 of 2

Thread: Texture pixel coordinate

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012
    Posts
    28

    Texture pixel coordinate

    Hello, I'm trying to set the texture coordinate by pixels. I do something like this:
    Code :
    glMatrixMode(GL_TEXTURE);
        glLoadIdentity();
        glOrtho(-width, width, -height, height, -1, 1);
     
    //...

    It works, but it's not accurate:


    If I use manual anti-aliasing it works.

    I read about GL_TEXTURE_RECTANBGLE_ARB, but I'm using OpenGL 1.1 and it's undefined on the header and (I think) in the library. I'm using Visual Studio 2010 and Visual C++ on Windows.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,189
    Quote Originally Posted by rodrigoloc View Post
    It works, but it's not accurate
    Please explain in more detail. The tiny picture doesn't spell it out.

Posting Permissions

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