Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: GL_POLYGON_SMOOTH

  1. #1
    Intern Newbie
    Join Date
    Dec 2005
    Posts
    36

    GL_POLYGON_SMOOTH

    Hi. I draw a square with istructions below (for
    reduce antialiasing):
    Code :
    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.
    Mickey

  2. #2
    Advanced Member Frequent Contributor Ehsan Kamrani's Avatar
    Join Date
    May 2005
    Location
    Iran
    Posts
    547

    Re: GL_POLYGON_SMOOTH

    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.
    <span style="color: #006600">-Ehsan-</span>

  3. #3
    Intern Newbie
    Join Date
    Dec 2005
    Posts
    36

    Re: GL_POLYGON_SMOOTH

    I know. But now my square appears aliased...
    Mickey

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •