Try alpha blending the conservation paths
authorDiane Trout <diane@caltech.edu>
Thu, 10 Aug 2006 23:21:04 +0000 (23:21 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 10 Aug 2006 23:21:04 +0000 (23:21 +0000)
It was too easy to lose selected tracks behind other, later drawn, tracks.
Perhaps alpha blending will let us see them better.

alg/glseqbrowser.cpp

index d7d60aa2724e43430d2ac4b3d301b675862753ab..470c7c437cf1cdac1adc6c4900857e36f63dfac1 100644 (file)
@@ -624,6 +624,8 @@ void GlSeqBrowser::draw_tracks() const
 void GlSeqBrowser::draw_segments() const
 {
   glLineWidth(1);
+  glEnable(GL_BLEND);
+  glDepthMask(GL_FALSE);
   // each vector contains path_segment_maps of all the connections
   // between this track and the next
   path_segment_map_vector::const_iterator psmv_i;
@@ -652,15 +654,15 @@ void GlSeqBrowser::draw_segments() const
 
       if (not s.reversed) {
         if (selected_paths.size() == 0 or selected.size() > 0) {
-          glColor3f(1.0, 0.0, 0.0);
+          glColor4f(1.0, 0.0, 0.0, 1.0);
         } else {
-          glColor3f(1.0, 0.8, 0.8);
+          glColor4f(1.0, 0.7, 0.7, 0.4);
         }
       } else { 
         if (selected_paths.size() == 0 or selected.size() > 0) {
-          glColor3f(0.0, 0.0, 1.0);
+          glColor4f(0.0, 0.0, 1.0, 1.0);
         } else {
-          glColor3f(0.8, 0.8, 1.0);
+          glColor4f(0.7, 0.7, 1.0, 0.4);
         }
         /*
         if (selected_paths.size() == 0 or selected.size() > 0) {
@@ -682,4 +684,6 @@ void GlSeqBrowser::draw_segments() const
       glPopName(); glPopName(); glPopName();
     }
   }
+  glDepthMask(GL_TRUE);
+  glDisable(GL_BLEND);
 }