i suspect that someone else has had a similar problem, but i couldn’t find it, so…
i have an image viewer that draws a cursor and graphics.
when i move the cross-hair (by floating point increments) the end-points are drawn differently with respect to eachother - if there is a 1 pixel break between vertical and horizontal lines, the horizontal lines may touch the vertical lines or may not (shifts back and forth).
i understand that each point must be rounded to a pixel on the screen, but why can’t they be rounded to the same relative pixels (so the cross-hair looks accurate to one pixel).
i’ve tried using anti-aliasing (GL_LINE_SMOOTH with GL_NICEST as the hint), but it just makes the lines thicker and they STILL shift at end points and now in thickness too!
another related problem i am having, is that when i move the imagery and graphics instead of the cursor, the graphics shift back and forth between pixels with respect to the movement of the imagery. The imagery has sub-pixel movement and looks great because the textures are using bilinear resampling.
i would really like the graphics to be tied down to the imagery – is this possible?
i suspect that i may have an error in the values i use for gluOrtho2D for the GL_PROJECTION… i’ve tried a few offsets, but haven’t had success.