X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fextrusion.c;h=0f35ffb642371ab47dbd209c6be2dcf0c8822e83;hp=81cdeb918a8d22a0869b9f901159cf8d4bbb40d0;hb=cccbddbc4140cf9a06d7d95cc5c0ca36eb5d6e28;hpb=a94197e76a5dea5cb60542840809d6c20d0abbf3 diff --git a/hacks/glx/extrusion.c b/hacks/glx/extrusion.c index 81cdeb91..0f35ffb6 100644 --- a/hacks/glx/extrusion.c +++ b/hacks/glx/extrusion.c @@ -454,10 +454,20 @@ void Create_Texture(char *filename, int do_mipmap, int do_texture_quality) } if (do_mipmap) { - gluBuild2DMipmaps(GL_TEXTURE_2D, format, width, height, - format, GL_UNSIGNED_BYTE, image); - } - else { + int status; + clear_gl_error(); + status = gluBuild2DMipmaps(GL_TEXTURE_2D, format, width, height, + format, GL_UNSIGNED_BYTE, image); + if (status) + { + const char *s = gluErrorString (status); + fprintf (stderr, "%s: error mipmapping %dx%d texture: %s\n", + progname, width, height, + (s ? s : "(unknown)")); + exit (1); + } + check_gl_error("mipmapping"); + } else { clear_gl_error(); glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, image);