Turn on polygon smoothing, in an attempt to get even smoother in the edges.
authorsgunderson@bigfoot.com <>
Wed, 21 Jul 2010 17:37:05 +0000 (19:37 +0200)
committersgunderson@bigfoot.com <>
Wed, 21 Jul 2010 17:37:05 +0000 (19:37 +0200)
glpitch.cpp

index 4aea821..e47e977 100644 (file)
@@ -101,6 +101,8 @@ int main(void)
                        double peak_pos = find_display_pos(peak.first);
 
                        glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+                       glEnable(GL_POLYGON_SMOOTH);
+
                        glBegin(GL_QUADS);      
                        glColor4f(0.0, 1.0f, 0.0f, 0.2f);
                        glVertex2f(peak_pos - 0.1, 0.0f);
@@ -108,6 +110,8 @@ int main(void)
                        glVertex2f(peak_pos + 0.1, 1.0f);
                        glVertex2f(peak_pos + 0.1, 0.0f);
                        glEnd();
+
+                       glDisable(GL_POLYGON_SMOOTH);
                }
 
                glColor4f(1.0f, 1.0f, 1.0f, 1.0f);