mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 22:20:14 +01:00
Draw white square in lower-left corner to test orientation
This commit is contained in:
parent
21b9b8b74e
commit
b7693ee559
1 changed files with 8 additions and 0 deletions
|
|
@ -57,6 +57,14 @@ static void Draw(void)
|
||||||
glVertex3f( 0.0, 0.9, -30.0);
|
glVertex3f( 0.0, 0.9, -30.0);
|
||||||
glEnd();
|
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);
|
glReadPixels(0, 0, Width, Height, GL_RGBA, GL_FLOAT, image);
|
||||||
printf("Pixel(0,0) = %f, %f, %f, %f\n",
|
printf("Pixel(0,0) = %f, %f, %f, %f\n",
|
||||||
image[0], image[1], image[2], image[3]);
|
image[0], image[1], image[2], image[3]);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue