summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-13 18:18:45 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-13 18:20:04 -0600
commit9f51e181b1b610c10ee00d52bdcfcf33d0f1f3ed (patch)
treec56e2c5ecda0671728c9078bff97271a028f008e /progs
parent2f605fd457ccd8763ce5b0acc8d2906a59ea22bc (diff)
downloadexternal_mesa3d-9f51e181b1b610c10ee00d52bdcfcf33d0f1f3ed.zip
external_mesa3d-9f51e181b1b610c10ee00d52bdcfcf33d0f1f3ed.tar.gz
external_mesa3d-9f51e181b1b610c10ee00d52bdcfcf33d0f1f3ed.tar.bz2
added pixelzoom cmd line opt
Diffstat (limited to 'progs')
-rw-r--r--progs/trivial/readpixels.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/trivial/readpixels.c b/progs/trivial/readpixels.c
index 65fb81e..783468a 100644
--- a/progs/trivial/readpixels.c
+++ b/progs/trivial/readpixels.c
@@ -10,6 +10,7 @@
#include <GL/glut.h>
static int Width = 250, Height = 250;
+static GLfloat Zoom = 1.0;
static void Init(void)
{
@@ -70,6 +71,7 @@ static void Draw(void)
image[0], image[1], image[2], image[3]);
/* draw to right half of window */
glWindowPos2iARB(Width, 0);
+ glPixelZoom(Zoom, Zoom);
glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image);
free(image);
@@ -86,6 +88,9 @@ int main(int argc, char **argv)
exit(1);
}
+ if (argc > 1)
+ Zoom = atof(argv[1]);
+
Init();
glutReshapeFunc(Reshape);