X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fmoebius.c;h=0220cbbb2476a1c5b78a7092df334ce624968f9f;hp=15e3732ee84e41b8743e19bda92df9137a3dd32e;hb=cccbddbc4140cf9a06d7d95cc5c0ca36eb5d6e28;hpb=a94197e76a5dea5cb60542840809d6c20d0abbf3 diff --git a/hacks/glx/moebius.c b/hacks/glx/moebius.c index 15e3732e..0220cbbb 100644 --- a/hacks/glx/moebius.c +++ b/hacks/glx/moebius.c @@ -584,6 +584,7 @@ reshape_moebius(ModeInfo * mi, int width, int height) static void pinit(void) { + int status; glClearDepth(1.0); glClearColor(0.0, 0.0, 0.0, 1.0); @@ -609,8 +610,21 @@ pinit(void) glDisable(GL_CULL_FACE); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, WoodTextureWidth, WoodTextureHeight, - GL_RGB, GL_UNSIGNED_BYTE, WoodTextureData); + + clear_gl_error(); + status = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, + WoodTextureWidth, WoodTextureHeight, + GL_RGB, GL_UNSIGNED_BYTE, WoodTextureData); + if (status) + { + const char *s = gluErrorString (status); + fprintf (stderr, "%s: error mipmapping %dx%d texture: %s\n", + progname, WoodTextureWidth, WoodTextureHeight, + (s ? s : "(unknown)")); + exit (1); + } + check_gl_error("mipmapping"); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);