Draw white square in lower-left corner to test orientation
authorBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 19:57:31 +0000 (13:57 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 20:00:03 +0000 (14:00 -0600)
progs/trivial/readpixels.c

index b1f04f81d971f1d0cdac1eec185762378ce20599..65fb81ed481ccd16f875a9a09bd096b5995d0532 100644 (file)
@@ -57,6 +57,14 @@ static void Draw(void)
    glVertex3f( 0.0,  0.9, -30.0);
    glEnd();
 
+   glBegin(GL_QUADS);
+   glColor3f(1, 1, 1);
+   glVertex2f(-1.0, -1.0);
+   glVertex2f(-0.9, -1.0);
+   glVertex2f(-0.9, -0.9);
+   glVertex2f(-1.0, -0.9);
+   glEnd();
+
    glReadPixels(0, 0, Width, Height, GL_RGBA, GL_FLOAT, image);
    printf("Pixel(0,0) = %f, %f, %f, %f\n",
           image[0], image[1], image[2], image[3]);