From http://www.jwz.org/xscreensaver/xscreensaver-5.23.tar.gz
[xscreensaver] / hacks / glx / quasicrystal.c
index d01d1edb590f09e79a83b095682349db49af9a18..75b35d807e1c5304e184d0b3f7e8d0412452a907 100644 (file)
@@ -179,7 +179,11 @@ init_quasicrystal (ModeInfo *mi)
   if (! wire)
     {
       unsigned char *o;
+
       tex_width = 4096;
+      glGetIntegerv (GL_MAX_TEXTURE_SIZE, &tex_width);
+      if (tex_width > 4096) tex_width = 4096;
+
       tex_data = (unsigned char *) calloc (4, tex_width);
       o = tex_data;
       for (i = 0; i < tex_width; i++)