Wide screen monitor dilemma

Strange problem with line antialiasing on certain monitors. My program while used on the 17" wide screen PowerBook and the 23" Cinema HD display won’t enable antialiasing when the screen resolution’s aspect ratio is larger than 4:3, but does work when the display is forced to 4:3.

In fact, in any aspect ratio, nothing is drawn (as far as lines go) when a call to glLineWidth() is made when the argument is anything other than 1.0. However, the screen is still flushed after every frame to the appropriate flush color.

It’s very odd since the same executable works perfetly on any other monitor so far.

Just so it’s clear what I’m doing, here’s the snippet of code I’m using to get antialiasing started:


Is this a case of suck-it-up-and-accept-it?

What GPU?

First off, you can’t depend on line antialiasing to do anything. Some GPUs (Rage 128, Radeon 9600/9800) don’t support line antialiasing at all, either because the hardware doesn’t do it or the driver sucks.

Secondly, each GPU has a different range of line widths, which you can query. On some GPUs (GF2MX, GF4MX) the max width is 1.0px, so you’ll never be able to draw any wide antialiased lines.

Third, although the GL spec says that line width of 0px ought to be treated as 1px, some drivers (Radeon 9600/9800 again) are buggy and don’t draw anything at all when the width is < 1.0px.

See http://homepage.mac.com/arekkusu/bugs/invariance/ for pictures.

The moral is, YOU CAN NOT DEPEND ON OPENGL LINE PRIMITIVES for anything other than 1 px wide aliased lines. If you need anything else, use a textured quad instead.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.