From 297d15e122e39ca1c80dc255b1d36b03111630fc Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 19 Feb 2012 20:05:35 +0100 Subject: OPENGL: Don't force alpha to 1 This was likely a hack to work around an alpha blending bug in the gui vector renderer. --- backends/graphics/opengl/opengl-graphics.cpp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'backends/graphics/opengl') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index cca8058625..45804b5d6e 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -501,26 +501,13 @@ void OpenGLGraphicsManager::copyRectToOverlay(const OverlayColor *buf, int pitch if (w <= 0 || h <= 0) return; - if (_overlayFormat.aBits() == 1) { - // Copy buffer with the alpha bit on for all pixels for correct - // overlay drawing. - const uint16 *src = (const uint16 *)buf; - uint16 *dst = (uint16 *)_overlayData.pixels + y * _overlayData.w + x; - for (int i = 0; i < h; i++) { - for (int e = 0; e < w; e++) - dst[e] = src[e] | 0x1; - src += pitch; - dst += _overlayData.w; - } - } else { - // Copy buffer data to internal overlay surface - const byte *src = (const byte *)buf; - byte *dst = (byte *)_overlayData.pixels + y * _overlayData.pitch; - for (int i = 0; i < h; i++) { - memcpy(dst + x * _overlayData.format.bytesPerPixel, src, w * _overlayData.format.bytesPerPixel); - src += pitch * sizeof(buf[0]); - dst += _overlayData.pitch; - } + // Copy buffer data to internal overlay surface + const byte *src = (const byte *)buf; + byte *dst = (byte *)_overlayData.pixels + y * _overlayData.pitch; + for (int i = 0; i < h; i++) { + memcpy(dst + x * _overlayData.format.bytesPerPixel, src, w * _overlayData.format.bytesPerPixel); + src += pitch * sizeof(buf[0]); + dst += _overlayData.pitch; } // Extend dirty area if not full screen redraw is flagged -- cgit v1.2.3