projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f605fd
)
added pixelzoom cmd line opt
author
Brian
<brian.paul@tungstengraphics.com>
Tue, 14 Aug 2007 00:18:45 +0000
(18:18 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Tue, 14 Aug 2007 00:20:04 +0000
(18:20 -0600)
progs/trivial/readpixels.c
patch
|
blob
|
history
diff --git
a/progs/trivial/readpixels.c
b/progs/trivial/readpixels.c
index 65fb81ed481ccd16f875a9a09bd096b5995d0532..783468ae2f63467b571b4bcc3de9cb8f43c75c37 100644
(file)
--- 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);