title: OpenGL: How to draw a triangle or polygon smoothly
body: <p>I'm drawing a triangle using polygonmode as below:</p>
  
  <pre><code>drawScene(void)
  {
      glPopMatrix();
      glEnable(GL_POLYGON_SMOOTH);
      glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
      glEnable(GL_BLEND);
      glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
      glShadeModel(GL_POLYGON_SMOOTH);
  
      glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
  
      glBegin(GL_POLYGON);
          glVertex3f(x,y,z);
          glVertex3f(x1,y1,z1);
          glVertex3f(x2,y2,z2);
      glEnd();
      glPopMatrix();
  }
  </code></pre>
  
  <p>Vertices (x, y, z, x1, y1, z1, x2, y2, z2) are calculating using sin() and cos() and im passing into drawScene() method. Triangle is rotated based on the sin() and cos() values. My problem is, triangle is not smooth when it is drawn. That is, outer part of the triangle is not have a smooth line. In the above code instead of GL_FILL if I use GL_LINE triangle looks smooth. But, I need a filled triangle.</p>