aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2012-02-19 20:05:35 +0100
committerWillem Jan Palenstijn2012-02-20 22:17:33 +0100
commit297d15e122e39ca1c80dc255b1d36b03111630fc (patch)
treec532609d08c08f816a98b059acd35c318e792a38 /backends/graphics/opengl
parent264ba4a9ec86dfe7a7fcc0cf02266e5950d102e5 (diff)
downloadscummvm-rg350-297d15e122e39ca1c80dc255b1d36b03111630fc.tar.gz
scummvm-rg350-297d15e122e39ca1c80dc255b1d36b03111630fc.tar.bz2
scummvm-rg350-297d15e122e39ca1c80dc255b1d36b03111630fc.zip
OPENGL: Don't force alpha to 1
This was likely a hack to work around an alpha blending bug in the gui vector renderer.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp27
1 files changed, 7 insertions, 20 deletions
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