projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3c68560
)
progs/tests: draw Z values as luminance, no pixel zoom
author
Brian Paul
<brianp@vmware.com>
Thu, 22 Oct 2009 03:51:06 +0000
(21:51 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 22 Oct 2009 03:51:19 +0000
(21:51 -0600)
progs/tests/zreaddraw.c
patch
|
blob
|
history
diff --git
a/progs/tests/zreaddraw.c
b/progs/tests/zreaddraw.c
index 7dfed20cfb9d2b2236c2b8b68aac37c4026cc3d9..7740695bb669914fccca6a806e5873cc88c58947 100644
(file)
--- a/
progs/tests/zreaddraw.c
+++ b/
progs/tests/zreaddraw.c
@@
-58,6
+58,10
@@
static void Display(void)
printf("Depth value range: [%f, %f]\n", min, max);
}
printf("Depth value range: [%f, %f]\n", min, max);
}
+ /* Draw the Z image as luminance above original rendering */
+ glWindowPos2i(0, 100);
+ glDrawPixels(100, 100, GL_LUMINANCE, depthType, depth);
+
if (TestPacking) {
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
if (TestPacking) {
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
@@
-100,6
+104,7
@@
static void Display(void)
glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2);
/* draw as luminance */
glPixelZoom(1.0, 1.0);
glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2);
/* draw as luminance */
glPixelZoom(1.0, 1.0);
+ glWindowPos2i(100, 0);
glDrawPixels(400, 400, GL_LUMINANCE, GL_FLOAT, depth2);
glutSwapBuffers();
glDrawPixels(400, 400, GL_LUMINANCE, GL_FLOAT, depth2);
glutSwapBuffers();