X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fpulsar.c;h=6e6194462ed899cd0853e88749c24a2907b6bed8;hb=cccbddbc4140cf9a06d7d95cc5c0ca36eb5d6e28;hp=7c67b83537991a979bb68885711e3f631ace43f6;hpb=3d9140a05b5272fed0883a0af0a71e30ef44d47f;p=xscreensaver diff --git a/hacks/glx/pulsar.c b/hacks/glx/pulsar.c index 7c67b835..6e619446 100644 --- a/hacks/glx/pulsar.c +++ b/hacks/glx/pulsar.c @@ -74,13 +74,6 @@ #ifdef USE_GL /* whole file */ -#ifdef HAVE_XPM -# include -# ifndef PIXEL_ALREADY_TYPEDEFED -# define PIXEL_ALREADY_TYPEDEFED /* Sigh, Xmu/Drawing.h needs this... */ -# endif -#endif - #ifdef HAVE_XMU # ifndef VMS # include @@ -93,9 +86,9 @@ #include #include -#include -#include +#include #include +#include /* Functions for loading and storing textures */ @@ -443,7 +436,6 @@ void Create_Texture(char *filename) { int height, width; GLubyte *image; - GLint a; int format; if ( !strncmp(filename, "BUILTIN", 7)) @@ -483,7 +475,21 @@ void Create_Texture(char *filename) /* mipmaps make the image look much nicer */ if (do_mipmap) - a=gluBuild2DMipmaps(GL_TEXTURE_2D, format, width, height, format, GL_UNSIGNED_BYTE, image); + { + 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(); @@ -613,7 +619,7 @@ void drawQuads(void) { GLvoid drawScene(ModeInfo * mi) { - check_gl_error ("drawScene"); +/* check_gl_error ("drawScene"); */ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* we have to do this here because the FPS meter turns these 3 features off!! */ @@ -647,7 +653,7 @@ GLvoid drawScene(ModeInfo * mi) /* increment frame-counter */ frame++; - check_gl_error ("drawScene"); +/* check_gl_error ("drawScene"); */ }