X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgflux.c;h=f2e682addcbbb6020a33468cf6b916064fc919e3;hb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;hp=ad14d01f2c1827e3a9f95f5ac99c03c4d905738b;hpb=40eacb5812ef7c0e3374fb139afbb4f5bc8bbfb5;p=xscreensaver diff --git a/hacks/glx/gflux.c b/hacks/glx/gflux.c index ad14d01f..f2e682ad 100644 --- a/hacks/glx/gflux.c +++ b/hacks/glx/gflux.c @@ -2,7 +2,7 @@ /* gflux - creates a fluctuating 3D grid * requires OpenGL or MesaGL * - * Copyright (c) Josiah Pease, 2000 + * Copyright (c) Josiah Pease, 2000, 2003 * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that @@ -148,19 +148,19 @@ static XrmOptionDescRec opts[] = { static argtype vars[] = { - {(caddr_t *) & _squares, "squares", "Squares", "19", t_Int}, - {(caddr_t *) & _resolution, "resolution", "Resolution", "4", t_Int}, -/* {(caddr_t *) & _draw, "draw", "Draw", "2", t_Int},*/ - {(caddr_t *) & _flat, "flat", "Flat", "0", t_Int}, - {(caddr_t *) & _speed, "speed", "Speed", "0.05", t_Float}, - {(caddr_t *) & _rotationx, "rotationx", "Rotationx", "0.01", t_Float}, - {(caddr_t *) & _rotationy, "rotationy", "Rotationy", "0.0", t_Float}, - {(caddr_t *) & _rotationz, "rotationz", "Rotationz", "0.1", t_Float}, - {(caddr_t *) & _waves, "waves", "Waves", "3", t_Int}, - {(caddr_t *) & _waveChange, "waveChange", "WaveChange", "50", t_Int}, - {(caddr_t *) & _waveHeight, "waveHeight", "WaveHeight", "1.0", t_Float}, - {(caddr_t *) & _waveFreq, "waveFreq", "WaveFreq", "3.0", t_Float}, - {(caddr_t *) & _zoom, "zoom", "Zoom", "1.0", t_Float}, + {&_squares, "squares", "Squares", "19", t_Int}, + {&_resolution, "resolution", "Resolution", "4", t_Int}, +/* {&_draw, "draw", "Draw", "2", t_Int},*/ + {&_flat, "flat", "Flat", "0", t_Int}, + {&_speed, "speed", "Speed", "0.05", t_Float}, + {&_rotationx, "rotationx", "Rotationx", "0.01", t_Float}, + {&_rotationy, "rotationy", "Rotationy", "0.0", t_Float}, + {&_rotationz, "rotationz", "Rotationz", "0.1", t_Float}, + {&_waves, "waves", "Waves", "3", t_Int}, + {&_waveChange, "waveChange", "WaveChange", "50", t_Int}, + {&_waveHeight, "waveHeight", "WaveHeight", "1.0", t_Float}, + {&_waveFreq, "waveFreq", "WaveFreq", "3.0", t_Float}, + {&_zoom, "zoom", "Zoom", "1.0", t_Float}, }; @@ -213,7 +213,7 @@ typedef struct { int imageMax; GLubyte *image; #endif - GLint texName; + GLuint texName; GLfloat tex_xscale; GLfloat tex_yscale; void (*drawFunc)(void); @@ -621,7 +621,8 @@ grabTexture(void) int real_width = gflux->modeinfo->xgwa.width; int real_height = gflux->modeinfo->xgwa.height; XImage *ximage = screen_to_ximage (gflux->modeinfo->xgwa.screen, - gflux->window); + gflux->window, + NULL); Bool bigimage = False; int size = 0; @@ -680,7 +681,7 @@ grabTexture(void) gflux->imageWidth = ximage->width; gflux->imageHeight = ximage->height; - gflux->image = ximage->data; + gflux->image = (GLubyte *) ximage->data; if (bigimage) /* don't scale really large images */ {