diff --git a/Common/Context.h b/Common/Context.h
index 63adb0f512c2fb8b5e2c971f1d376a6b5fb8dd38..3c816514d56eccb14d6f4cf8ff7b88417f464c24 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -108,6 +108,7 @@ public :
   int small_axes_pos[2];      // small axes position 
   int threads, threads_lock;  // threads?, lock (should be a mutex...) 
   int alpha;                  // enable alpha blending 
+  int fake_transparency;      // use fake transparency (a la xpost)
   double zoom_factor;         // mouse2 zoom coefficient
 
   int fontsize;               // font size for fltk UI
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 496f8b4a2548b4223abe66a2c6391bd0c352f26c..7678da05e55157f7640b1224b3272153483f7c75 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -445,6 +445,8 @@ StringXNumber GeneralOptions_Number[] = {
   { F|O, "DoubleBuffer" , opt_general_double_buffer , 1. ,
     "Use a double buffered graphic window (on Unix, should be set to 0 when working on a remote host without GLX)" },
 
+  { F|O, "FakeTransparency" , opt_general_fake_transparency , 0. ,
+    "Use fake transparency (cheaper than the real thing, but incorrect)" },
   { F|O, "FastRedraw" , opt_general_fast_redraw , 1. ,
     "Fast redraw (no mesh or view display) when interacting with the model" },
   { F|S, "FontSize" , opt_general_fontsize , 12. , 
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 73b2ffe1dae2e6b362589d5f5718f4f016cce413..48fecf3f3a7a5d006295feea6daa889de9907cac 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.163 2004-06-02 00:16:30 geuzaine Exp $
+// $Id: Options.cpp,v 1.164 2004-06-04 02:07:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -2327,11 +2327,18 @@ double opt_general_alpha_blending(OPT_ARGS_NUM)
 {
   if(action & GMSH_SET)
     CTX.alpha = (int)val;
+  return CTX.alpha;
+}
+
+double opt_general_fake_transparency(OPT_ARGS_NUM)
+{
+  if(action & GMSH_SET)
+    CTX.fake_transparency = (int)val;
 #if defined(HAVE_FLTK)
   if(WID && (action & GMSH_GUI))
-    WID->gen_butt[4]->value(CTX.alpha);
+    WID->gen_butt[4]->value(CTX.fake_transparency);
 #endif
-  return CTX.alpha;
+  return CTX.fake_transparency;
 }
 
 double opt_general_vector_type(OPT_ARGS_NUM)
diff --git a/Common/Options.h b/Common/Options.h
index 4650393da40c8a547c5923d56e8c011c35fe26c0..d26d916b6598fbf8c9b0f32a1d1c21578bc9547d 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -247,6 +247,7 @@ double opt_general_small_axes_position1(OPT_ARGS_NUM);
 double opt_general_quadric_subdivisions(OPT_ARGS_NUM);
 double opt_general_double_buffer(OPT_ARGS_NUM);
 double opt_general_alpha_blending(OPT_ARGS_NUM);
+double opt_general_fake_transparency(OPT_ARGS_NUM);
 double opt_general_vector_type(OPT_ARGS_NUM);
 double opt_general_arrow_head_radius(OPT_ARGS_NUM);
 double opt_general_arrow_stem_length(OPT_ARGS_NUM);
diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp
index bb1d8d9e47bbf129de66a9291d5b8f6cb7864a86..10f0d7e29febfb4a32748ea7cc17191fe67b894b 100644
--- a/Fltk/Callbacks.cpp
+++ b/Fltk/Callbacks.cpp
@@ -1,4 +1,4 @@
-// $Id: Callbacks.cpp,v 1.245 2004-06-01 22:16:24 geuzaine Exp $
+// $Id: Callbacks.cpp,v 1.246 2004-06-04 02:07:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -858,7 +858,7 @@ void general_options_ok_cb(CALLBACK_ARGS)
   opt_general_fast_redraw(0, GMSH_SET, WID->gen_butt[2]->value());
   if(opt_general_double_buffer(0, GMSH_GET, 0) != WID->gen_butt[3]->value())
     opt_general_double_buffer(0, GMSH_SET, WID->gen_butt[3]->value());
-  opt_general_alpha_blending(0, GMSH_SET, WID->gen_butt[4]->value());
+  opt_general_fake_transparency(0, GMSH_SET, WID->gen_butt[4]->value());
   opt_general_trackball(0, GMSH_SET, WID->gen_butt[5]->value());
   opt_general_terminal(0, GMSH_SET, WID->gen_butt[7]->value());
   double sessionrc = opt_general_session_save(0, GMSH_GET, 0);
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 97a9bb213669e7b32c945f471870e5a7e8139e0f..7ffdd303d4b96ad66851d37cd8974bbf5c56f5f4 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.313 2004-06-02 00:16:30 geuzaine Exp $
+// $Id: GUI.cpp,v 1.314 2004-06-04 02:07:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -1458,7 +1458,7 @@ void GUI::create_option_window()
       gen_butt[1] = new Fl_Check_Button(2 * WB, 2 * WB + 3 * BH, BW, BH, "Show small axes");
       gen_butt[2] = new Fl_Check_Button(2 * WB, 2 * WB + 4 * BH, BW, BH, "Enable fast redraw");
       gen_butt[3] = new Fl_Check_Button(2 * WB, 2 * WB + 5 * BH, BW, BH, "Enable double buffering");
-      gen_butt[4] = new Fl_Check_Button(2 * WB, 2 * WB + 6 * BH, BW, BH, "Enable alpha blending");
+      gen_butt[4] = new Fl_Check_Button(2 * WB, 2 * WB + 6 * BH, BW, BH, "Use fake transparency");
       gen_butt[5] = new Fl_Check_Button(2 * WB, 2 * WB + 7 * BH, BW, BH, "Use trackball rotation mode");
       for(i = 0; i < 6; i++) {
         gen_butt[i]->type(FL_TOGGLE_BUTTON);
diff --git a/Graphics/Draw.cpp b/Graphics/Draw.cpp
index 2d21f808d163c9a697e35dde0baa28b0ff52ca56..f0706ab940307aabe53efd44f3c109773382b5ad 100644
--- a/Graphics/Draw.cpp
+++ b/Graphics/Draw.cpp
@@ -1,4 +1,4 @@
-// $Id: Draw.cpp,v 1.58 2004-06-02 15:04:33 geuzaine Exp $
+// $Id: Draw.cpp,v 1.59 2004-06-04 02:07:06 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -36,14 +36,9 @@ extern Mesh M;
 
 void Draw3d(void)
 {
-  if(CTX.alpha) {
-    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    glEnable(GL_BLEND);
-  }
   glPolygonOffset(1.0, 1.0);
   glDepthFunc(GL_LESS);
   glEnable(GL_DEPTH_TEST);
-  glDisable(GL_CULL_FACE);
 
   InitRenderModel();
 
diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 44e9eb3ae27229db56427d5e7b368efcb8496634..b19e6a51407e17f25ef101a0eb82a9746b1ed370 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.67 2004-06-01 16:49:01 geuzaine Exp $
+// $Id: Post.cpp,v 1.68 2004-06-04 02:07:07 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -407,36 +407,48 @@ void Draw_Post(void)
 	break;
       }
 
-      // if we don't use vertex arrays, do a simple sort of
-      // transparent views (hybrid views will be sorted incorrectly;
-      // use Plugin(DecomposeInSimplex) and View->Combine to do remedy
-      // this limitation)
-      if(!CTX.post.vertex_arrays && CTX.alpha && ColorTable_IsAlpha(&v->CT) && 
-	 v->DrawScalars && (changedEye() || v->Changed)) {
-	Msg(DEBUG, "Sorting View[%d] for transparency (NO vertex array)", v->Index);
-	if(v->NbST && v->DrawTriangles) {
-	  nb = List_Nbr(v->ST) / v->NbST;
-	  qsort(v->ST->array, v->NbST, nb * sizeof(double), compareEye3Nodes);
+      // initialize alpha blending for transparency
+      if(CTX.alpha && ColorTable_IsAlpha(&v->CT)){
+	if(CTX.fake_transparency){ // "a la xpost"
+	  glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+	  glEnable(GL_BLEND);
+	  glDisable(GL_DEPTH_TEST);
 	}
-	if(v->NbSQ && v->DrawQuadrangles) {
-	  nb = List_Nbr(v->SQ) / v->NbSQ;
-	  qsort(v->SQ->array, v->NbSQ, nb * sizeof(double), compareEye4Nodes);
-	}
-	if(v->NbSS && v->DrawTetrahedra) {
-	  nb = List_Nbr(v->SS) / v->NbSS;
-	  qsort(v->SS->array, v->NbSS, nb * sizeof(double), compareEye4Nodes);
-	}
-	if(v->NbSH && v->DrawHexahedra) {
-	  nb = List_Nbr(v->SH) / v->NbSH;
-	  qsort(v->SH->array, v->NbSH, nb * sizeof(double), compareEye8Nodes);
-	}
-	if(v->NbSI && v->DrawPrisms) {
-	  nb = List_Nbr(v->SI) / v->NbSI;
-	  qsort(v->SI->array, v->NbSI, nb * sizeof(double), compareEye6Nodes);
-	}
-	if(v->NbSY && v->DrawPyramids) {
-	  nb = List_Nbr(v->SY) / v->NbSY;
-	  qsort(v->SY->array, v->NbSY, nb * sizeof(double), compareEye5Nodes);
+	else{
+	  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+	  glEnable(GL_BLEND);
+	  // if we don't use vertex arrays, do a simple sort of
+	  // transparent views (hybrid views will be sorted incorrectly;
+	  // use Plugin(DecomposeInSimplex) and View->Combine to do remedy
+	  // this limitation)
+	  if(!CTX.post.vertex_arrays && v->DrawScalars && 
+	     (changedEye() || v->Changed)) {
+	    Msg(DEBUG, "Sorting View[%d] for transparency (NO vertex array)", v->Index);
+	    if(v->NbST && v->DrawTriangles) {
+	      nb = List_Nbr(v->ST) / v->NbST;
+	      qsort(v->ST->array, v->NbST, nb * sizeof(double), compareEye3Nodes);
+	    }
+	    if(v->NbSQ && v->DrawQuadrangles) {
+	      nb = List_Nbr(v->SQ) / v->NbSQ;
+	      qsort(v->SQ->array, v->NbSQ, nb * sizeof(double), compareEye4Nodes);
+	    }
+	    if(v->NbSS && v->DrawTetrahedra) {
+	      nb = List_Nbr(v->SS) / v->NbSS;
+	      qsort(v->SS->array, v->NbSS, nb * sizeof(double), compareEye4Nodes);
+	    }
+	    if(v->NbSH && v->DrawHexahedra) {
+	      nb = List_Nbr(v->SH) / v->NbSH;
+	      qsort(v->SH->array, v->NbSH, nb * sizeof(double), compareEye8Nodes);
+	    }
+	    if(v->NbSI && v->DrawPrisms) {
+	      nb = List_Nbr(v->SI) / v->NbSI;
+	      qsort(v->SI->array, v->NbSI, nb * sizeof(double), compareEye6Nodes);
+	    }
+	    if(v->NbSY && v->DrawPyramids) {
+	      nb = List_Nbr(v->SY) / v->NbSY;
+	      qsort(v->SY->array, v->NbSY, nb * sizeof(double), compareEye5Nodes);
+	    }
+	  }
 	}
       }
       
@@ -529,7 +541,8 @@ void Draw_Post(void)
 
       if(v->TriVertexArray && v->TriVertexArray->num){
 
-	if(CTX.alpha && ColorTable_IsAlpha(&v->CT) && (changedEye() || v->Changed)){
+	if(CTX.alpha && ColorTable_IsAlpha(&v->CT) && !CTX.fake_transparency &&
+	   (changedEye() || v->Changed)){
 	  Msg(DEBUG, "Sorting View[%d] for transparency (WITH vertex array)", v->Index);
 	  v->TriVertexArray->sort(storedEye);
 	}
@@ -560,6 +573,12 @@ void Draw_Post(void)
 	glColor4ubv((GLubyte *) & CTX.color.text);
 	Draw_Text2D3D(3, v->TimeStep, v->NbT3, v->T3D, v->T3C);
       }
+
+      // reset alpha blending
+      if(CTX.alpha){
+	glDisable(GL_BLEND);
+	glEnable(GL_DEPTH_TEST);
+      }
       
       v->Changed = 0;
     }