Mesa (texformat-rework): progs/tests: draw Z values as luminance, no pixel zoom
Brian Paul
brianp at kemper.freedesktop.org
Thu Oct 22 03:51:34 UTC 2009
Module: Mesa
Branch: texformat-rework
Commit: 82ffc5884c29a8d4eb70fde15f27cace4732a4bb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=82ffc5884c29a8d4eb70fde15f27cace4732a4bb
Author: Brian Paul <brianp at vmware.com>
Date: Wed Oct 21 21:51:06 2009 -0600
progs/tests: draw Z values as luminance, no pixel zoom
---
progs/tests/zreaddraw.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/progs/tests/zreaddraw.c b/progs/tests/zreaddraw.c
index 7dfed20..7740695 100644
--- 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);
}
+ /* 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);
@@ -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);
+ glWindowPos2i(100, 0);
glDrawPixels(400, 400, GL_LUMINANCE, GL_FLOAT, depth2);
glutSwapBuffers();
More information about the mesa-commit
mailing list