Skip to content
Snippets Groups Projects
Commit 95fcd1c5 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

enable transparent background images (ticket #233)

parent 3d03f783
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment