X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=jwxyz%2Fjwxyz-gl.c;h=2f15b1aa0199e050c6bce59b17d177561cc3ed5d;hp=66944ed25a61aa870c1661d80c09ed395f8b67f2;hb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;hpb=aa75c7476aeaa84cf3abc192b376a8b03c325213 diff --git a/jwxyz/jwxyz-gl.c b/jwxyz/jwxyz-gl.c index 66944ed2..2f15b1aa 100644 --- a/jwxyz/jwxyz-gl.c +++ b/jwxyz/jwxyz-gl.c @@ -149,20 +149,6 @@ # include #else - -#ifdef HAVE_ANDROID - extern void Log(const char *fmt, ...); -#else -static void -Log (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - vfprintf (stderr, fmt, args); - va_end (args); -} -#endif - struct CGPoint { float x; float y; @@ -1778,13 +1764,16 @@ XPutImage (Display *dpy, Drawable d, GC gc, XImage *ximage, glVertexPointer (2, GL_FLOAT, 0, vertices); glTexCoordPointer (2, GL_FLOAT, 0, tex_coords); - // Respect the alpha channel in the XImage - glEnable (GL_BLEND); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + // Respect the alpha channel in the XImage if we're using alpha. + if (gc->gcv.alpha_allowed_p) { + glEnable (GL_BLEND); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } glDrawArrays (GL_TRIANGLE_FAN, 0, 4); - glDisable (GL_BLEND); + if (gc->gcv.alpha_allowed_p) + glDisable (GL_BLEND); // clear_texture(); glDisable (dpy->gl_texture_target); @@ -2798,35 +2787,6 @@ XFreeStringList (char **list) } -// Returns the verbose Unicode name of this character, like "agrave" or -// "daggerdouble". Used by fontglide debugMetrics. -// -char * -jwxyz_unicode_character_name (Font fid, unsigned long uc) -{ - /* TODO Fonts - char *ret = 0; - CTFontRef ctfont = - CTFontCreateWithName ((CFStringRef) [fid->nsfont fontName], - [fid->nsfont pointSize], - NULL); - Assert (ctfont, @"no CTFontRef for UIFont"); - - CGGlyph cgglyph; - if (CTFontGetGlyphsForCharacters (ctfont, (UniChar *) &uc, &cgglyph, 1)) { - NSString *name = (NSString *) - CGFontCopyGlyphNameForGlyph (CTFontCopyGraphicsFont (ctfont, 0), - cgglyph); - ret = (name ? strdup ([name UTF8String]) : 0); - } - - CFRelease (ctfont); - return ret; - */ - return NULL; -} - - // Given a UTF8 string, return an NSString. Bogus UTF8 characters are ignored. // We have to do this because stringWithCString returns NULL if there are // any invalid characters at all.