PDA

View Full Version : Texture pixel coordinate



rodrigoloc
09-28-2012, 06:52 PM
Hello, I'm trying to set the texture coordinate by pixels. I do something like this:


glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glOrtho(-width, width, -height, height, -1, 1);

//...


It works, but it's not accurate:
http://i.imgur.com/0b91T.png

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.

Dark Photon
09-29-2012, 05:12 PM
It works, but it's not accurate
Please explain in more detail. The tiny picture doesn't spell it out.