Mesa (master): trivial/tri-viewport: add more out-of-bounds background quads
Keith Whitwell
keithw at kemper.freedesktop.org
Tue Apr 21 10:44:31 UTC 2009
Module: Mesa
Branch: master
Commit: 6e05224bc4d00ba05fee8651d2a9ecbf2a4b3ca8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e05224bc4d00ba05fee8651d2a9ecbf2a4b3ca8
Author: Keith Whitwell <keithw at vmware.com>
Date: Tue Apr 21 10:59:54 2009 +0100
trivial/tri-viewport: add more out-of-bounds background quads
---
progs/trivial/tri-viewport.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/progs/trivial/tri-viewport.c b/progs/trivial/tri-viewport.c
index 37e4244..1337442 100644
--- a/progs/trivial/tri-viewport.c
+++ b/progs/trivial/tri-viewport.c
@@ -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);
More information about the mesa-commit
mailing list