PDA

View Full Version : GL_POLYGON_SMOOTH



Mickey_dup1
12-19-2005, 01:03 AM
Hi. I draw a square with istructions below (for
reduce antialiasing):


glEnable(GL_POLYGON_SMOOTH);
glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);But in the square appear a diagonal line.
Why this? How do I remove it?
Thanks.

Ehsan Kamrani
12-19-2005, 06:26 AM
Dorbie had written some comments for me about the GL_POLYGON_SMOOTH :

I had a quick look at your code and this line is a problem:

glEnable( GL_POLYGON_SMOOTH );

You shouldn't really enable this, it's for blended anti-aliasing and is typically incompatible with depth buffering.

Remove this and it should fix the diagonal line accross your trees and probably speed up the rest of your rendering for normal triangles due to disabling the generation of extra edge pixels and their alpha.

Mickey_dup1
12-19-2005, 11:05 AM
I know. But now my square appears aliased...