PDA

View Full Version : glEnable(GL_POLYGON_SMOOTH)



joeyeh
11-12-2001, 03:01 PM
I am drawing a face as a set of triangles,
and glEnable(GL_POLYGON_SMOOTH) seems to do
a good job of reducing aliasing effects
between regions, except now there are black
lines at the triangle boundaries. Anybody
know how I can get rid of them?

Thanks,

Joe

chowe6685
11-12-2001, 05:20 PM
glEnable(GL_LINE_SMOOTH)?
that might work, of course it might also kill your frame rate

Shag
11-12-2001, 06:40 PM
Do you have anti-aliasing turned on?

I have had this problem drawing EXTREMELY large polygons with AA turned on - in which case turn it off!

In my case this was a driver issue is some ways - but not the fault of the drivers - I think it's to do with the fact that when sending double precision polys to the driver, there is enevitably some rounding of the vertices - make sure you are using floats

joeyeh
11-27-2001, 03:43 PM
Actually, the frame rate is already pretty
dismal, because I don't have any hardware
acceleration. glEnable(GL_LINE_SMOOTH)
doesn't seem to have any effect.

Anti-aliasing is turned on, but the polygons
aren't huge.

Thanks

Korval
11-27-2001, 08:52 PM
In order for GL_POLYGON_SMOOTH to do what you want (ie, antialias polygon edges) correctly, you have to sort every polygon in depth order as though it were transparent. That is, each polygon must be drawn back-to-front, and you must use alpha blending.

That, and the lack of hardware acceleration, is why nobody uses GL_POLYGON_SMOOTH.