GL_POLYGON_SMOOTH

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.

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.

I know. But now my square appears aliased…