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

better blending of background image

parent 5b473484
No related branches found
No related tags found
No related merge requests found
...@@ -481,8 +481,8 @@ void drawContext::drawBackgroundImage(bool threeD) ...@@ -481,8 +481,8 @@ void drawContext::drawBackgroundImage(bool threeD)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, _bgImageTexture); glBindTexture(GL_TEXTURE_2D, _bgImageTexture);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBegin(GL_QUADS); glBegin(GL_QUADS);
glColor4ubv((GLubyte *) & CTX::instance()->color.bg);
if(threeD){ if(threeD){
glTexCoord2f(1.0f, 1.0f); glVertex2d(x+w, y); glTexCoord2f(1.0f, 1.0f); glVertex2d(x+w, y);
glTexCoord2f(1.0f, 0.0f); glVertex2d(x+w, y+h); glTexCoord2f(1.0f, 0.0f); glVertex2d(x+w, y+h);
......
...@@ -158,3 +158,9 @@ Volume(186) = {theloops[]} ; ...@@ -158,3 +158,9 @@ Volume(186) = {theloops[]} ;
// with numbers 1 to 5 in the `For' loop): // with numbers 1 to 5 in the `For' loop):
Physical Volume (10) = 186 ; 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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment