View Full Version : line rasterization

01-07-2007, 08:48 PM
I recently found out that if I render 2 parallel lines (GL_LINE), one of them is 1 pixel shorter than the other at the top. No, it's not numerical precision issue in my code. When I use another video card, the other line (#2) is 1 pixel shorter, but at the bottom. If I try the MS software renderer, line #1 is short, but this time at the bottom.

Is there some issue in line rendering algorithms?

I have already solved the problem with some other means.

01-07-2007, 10:02 PM
It is possible that line rendered from left to right will be rasterized differently than line rendered from right to left. Same goes for polygons rendered as CW and CCW.
Is that your case?

01-08-2007, 06:28 AM
No, top to bottom or bottom to top doesn't seem to make a difference. Seems to be a case of circumstance. I render another line (#3) next to these lines and the missing pixel of line #1 comes back.

In my case, I want to render some 2D square thing, so it looks weird with an edge missing a pixel.