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: OpenGL offset by one pixel under OS X

  1. #1
    Guest

    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

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: OpenGL offset by one pixel under OS X

    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.

Posting Permissions

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