From 95fcd1c58c596dadafc817ebc0eadc07636c931d Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 12 May 2014 19:59:06 +0000 Subject: [PATCH] enable transparent background images (ticket #233) --- Graphics/drawContext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index d6ce398cfe..a655607550 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -447,6 +447,8 @@ void drawContext::drawBackgroundImage(bool threeD) h = _bgImageH; } + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, _bgImageTexture); glBegin(GL_QUADS); @@ -472,6 +474,7 @@ void drawContext::drawBackgroundImage(bool threeD) } glEnd(); glDisable(GL_TEXTURE_2D); + glDisable(GL_BLEND); } void drawContext::initProjection(int xpick, int ypick, int wpick, int hpick) -- GitLab