trivial/tri-viewport: add more out-of-bounds background quads
authorKeith Whitwell <keithw@vmware.com>
Tue, 21 Apr 2009 09:59:54 +0000 (10:59 +0100)
committerKeith Whitwell <keithw@vmware.com>
Tue, 21 Apr 2009 10:13:16 +0000 (11:13 +0100)
progs/trivial/tri-viewport.c

index 37e424467b91bdd25c8e61878f858de8b95a9c1a..133744235f4f83bd09ef261cf6bf93216138bf43 100644 (file)
@@ -103,14 +103,40 @@ static void Draw(void)
     * Should be clipped to be no larger than the triangles:
     */
    glViewport(tx, ty, w, h);
+
    glBegin(GL_POLYGON);
-   glColor3f(.5,.5,1); 
+   glColor3f(1,1,0); 
+   glVertex3f(-100, -100, -30.0);
+   glVertex3f(-100, 100, -30.0);
+   glVertex3f(100, 100, -30.0);
+   glVertex3f(100, -100, -30.0);
+   glEnd();
+
+   glBegin(GL_POLYGON);
+   glColor3f(0,1,1); 
+   glVertex3f(-10, -10, -30.0);
+   glVertex3f(-10, 10, -30.0);
+   glVertex3f(10, 10, -30.0);
+   glVertex3f(10, -10, -30.0);
+   glEnd();
+
+   glBegin(GL_POLYGON);
+   glColor3f(1,0,0); 
    glVertex3f(-2, -2, -30.0);
    glVertex3f(-2, 2, -30.0);
    glVertex3f(2, 2, -30.0);
    glVertex3f(2, -2, -30.0);
    glEnd();
 
+
+   glBegin(GL_POLYGON);
+   glColor3f(.5,.5,1); 
+   glVertex3f(-1, -1, -30.0);
+   glVertex3f(-1, 1, -30.0);
+   glVertex3f(1, 1, -30.0);
+   glVertex3f(1, -1, -30.0);
+   glEnd();
+
    /***********************************************************************
     */
    glViewport(0, 0, win_width, win_height);