Update git ignores.
[mesa.git] / progs / trivial / line.c
index 93f10b897b263d8077b48c1c60061155fa734486..de5f9274e4147a1ce20617764b5480ada2287150 100644 (file)
@@ -40,7 +40,7 @@ static void Init(void)
    fprintf(stderr, "GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
    fprintf(stderr, "GL_VENDOR     = %s\n", (char *) glGetString(GL_VENDOR));
 
-    glClearColor(0.3, 0.3, 0.3, 0.0);
+    glClearColor(0.0, 0.0, 1.0, 0.0);
 }
 
 static void Reshape(int width, int height)
@@ -71,15 +71,20 @@ static void Draw(void)
 {
    glClear(GL_COLOR_BUFFER_BIT); 
 
-   glBegin(GL_LINE_STRIP);
+   glBegin(GL_LINES);
    glColor3f(0,0,.7); 
    glVertex3f( 0.9, -0.9, -30.0);
    glColor3f(.8,0,0); 
    glVertex3f( 0.9,  0.9, -30.0);
+
+   glColor3f(.8,0,0); 
+   glVertex3f( 0.9,  0.9, -30.0);
+   glColor3f(0,.9,0); 
+   glVertex3f(-0.9,  0.0, -30.0);
+
+
    glColor3f(0,.9,0); 
    glVertex3f(-0.9,  0.0, -30.0);
-   /* Repeat the first vertex - don't have lineloop support in GS yet
-    */
    glColor3f(0,0,.7); 
    glVertex3f( 0.9, -0.9, -30.0);
    glEnd();
@@ -122,7 +127,7 @@ int main(int argc, char **argv)
 
     glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
 
-    type = GLUT_RGB | GLUT_ALPHA;
+    type = GLUT_RGB;
     type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
     glutInitDisplayMode(type);