From f3feef3e6338b23f8b6dbe5bea3a67f55fc073b7 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 5 Feb 2015 09:12:33 +0000 Subject: [PATCH] better blending of background image --- Graphics/drawContext.cpp | 2 +- tutorial/t5.geo | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index d0d53cad1a..2b950e203f 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -481,8 +481,8 @@ void drawContext::drawBackgroundImage(bool threeD) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, _bgImageTexture); + glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBegin(GL_QUADS); - glColor4ubv((GLubyte *) & CTX::instance()->color.bg); if(threeD){ glTexCoord2f(1.0f, 1.0f); glVertex2d(x+w, y); glTexCoord2f(1.0f, 0.0f); glVertex2d(x+w, y+h); diff --git a/tutorial/t5.geo b/tutorial/t5.geo index d10f08ae06..59069164f8 100644 --- a/tutorial/t5.geo +++ b/tutorial/t5.geo @@ -158,3 +158,9 @@ Volume(186) = {theloops[]} ; // with numbers 1 to 5 in the `For' loop): Physical Volume (10) = 186 ; + +// We could make only part of the model visible to only mesh this subset: +// +// Hide "*"; +// Recursive Show { Volume{129}; } +// Mesh.MeshOnlyVisible=1; -- GitLab