http://www.jwz.org/xscreensaver/xscreensaver-5.13.tar.gz
[xscreensaver] / hacks / glx / timetunnel.c
index 18f38131f4f9b3c1f5eb7d9d4c634890be5e2da4..68eaf34c3bac944db26eb43f2e1bfe801019ce8e 100644 (file)
@@ -585,7 +585,7 @@ l|      |r
                tr0, tr1,
                tl0, tl1,
                l0 , l1 ,
-               bl0, depth=0.3, zdepth=15.0;
+               depth=0.3, zdepth=15.0;
        /* zdepth is how far back tunnel goes */
        /* depth is tex coord scale.  low number = fast texture shifting */
 
@@ -601,7 +601,6 @@ l|      |r
        tl1 = tl0 + half_floor;
        l0 = tr1;
        l1 = l0 + full_wall;
-       bl0 = l1;
 
        glMatrixMode(GL_TEXTURE);
        glLoadIdentity();
@@ -965,7 +964,6 @@ static void LoadTexture(ModeInfo * mi, char **fn, const char *filename, GLuint t
                                                tmpa =  teximage->data[dtaidx + cchan];
                                                tmpfa = (float) tmpa * boxdiv;
                                                /* box filter */
-                                               blursum = 0.0;
                                                for (by = -boxsize ; by <= boxsize; by++) {
                                                        for (bx = -boxsize ; bx <= boxsize; bx++) {
                                                                indx = wrapVal(ix + bx, 0, teximage->width);
@@ -991,6 +989,7 @@ static void LoadTexture(ModeInfo * mi, char **fn, const char *filename, GLuint t
         clear_gl_error();
 #ifdef HAVE_GLBINDTEXTURE
         glBindTexture(GL_TEXTURE_2D, texbind);
+        clear_gl_error(); /* WTF? sometimes "invalid op" from glBindTexture! */
 #endif
         glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, teximage->width, teximage->height,
@@ -1057,8 +1056,6 @@ init_tunnel (ModeInfo *mi)
       fprintf(stderr, "%s: out of memory\n", progname);
       exit(1);
     }
-
-    tc = &tconf[MI_SCREEN(mi)];
   }
 
   tc = &tconf[MI_SCREEN(mi)];