diff options
Diffstat (limited to 'progs')
-rw-r--r-- | progs/trivial/tri-fbo-tex-mip.c | 1 | ||||
-rw-r--r-- | progs/xdemos/glxgears.c | 1 | ||||
-rw-r--r-- | progs/xdemos/offset.c | 10 |
3 files changed, 11 insertions, 1 deletions
diff --git a/progs/trivial/tri-fbo-tex-mip.c b/progs/trivial/tri-fbo-tex-mip.c index df4725c7b4e..2e8fb74a00b 100644 --- a/progs/trivial/tri-fbo-tex-mip.c +++ b/progs/trivial/tri-fbo-tex-mip.c @@ -6,7 +6,6 @@ #include <assert.h> #include <stdio.h> #include <stdlib.h> -#include <math.h> /* For debug */ diff --git a/progs/xdemos/glxgears.c b/progs/xdemos/glxgears.c index 088f25a357a..2993c824161 100644 --- a/progs/xdemos/glxgears.c +++ b/progs/xdemos/glxgears.c @@ -771,6 +771,7 @@ main(int argc, char *argv[]) glDeleteLists(gear1, 1); glDeleteLists(gear2, 1); glDeleteLists(gear3, 1); + glXMakeCurrent(dpy, None, NULL); glXDestroyContext(dpy, ctx); XDestroyWindow(dpy, win); XCloseDisplay(dpy); diff --git a/progs/xdemos/offset.c b/progs/xdemos/offset.c index 314a4fcdd17..3858a5b8020 100644 --- a/progs/xdemos/offset.c +++ b/progs/xdemos/offset.c @@ -94,6 +94,9 @@ static int attributeList[] = { GLX_RGBA, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, static int dimension = 3; +static float Scale = 1.0; + + int main(int argc, char** argv) { Display *dpy; XVisualInfo *vi; @@ -182,6 +185,7 @@ draw_scene(int mx, int my) { #else glEnable(GL_POLYGON_OFFSET_FILL); #endif + glScalef(Scale, Scale, Scale); cubes(mx, my, HIDDEN_LINE); #ifdef GL_EXT_polygon_offset glDisable(GL_POLYGON_OFFSET_EXT); @@ -289,6 +293,12 @@ process_input(Display *dpy, Window win) { case KeyPress: (void) XLookupString(&event.xkey, buf, sizeof(buf), &keysym, NULL); switch (keysym) { + case 'Z': + Scale *= 1.1; + break; + case 'z': + Scale *= 0.9; + break; case XK_Escape: exit(EXIT_SUCCESS); default: |