OpenGL offset by one pixel under OS X

Hello,

I have two different applications (separate codbases) on the Mac that run on OS 9 and OS X and both applications are offseting the gl drawing area by one pixel horizontally and vertically when they are run under OS X. Under OS 9 they seem to run fine. Has anyone run into this problem. Is this an OS X bug, or could both applications be doing something wrong. Thanks for any information, I have not been able to find anything on apple’s website or here regarding this problem.

luis

I believe it’s a pixel center problem. Please describe your situation in more detail.

The pixel center problem generally occurs when you set an orthographic projection that matches the size of the window. You do that to be able to send coodinates that translates directly into window coordinates. The problem is that if you don’t compensate for the fact that the center of the pixel is not located at integer coordinates in window space, you alway hit the corner between four pixels. Which pixel that is actually choosen may be implementation dependent, and that may be what you are experiencing.