From: Diane Trout Date: Thu, 10 Aug 2006 23:21:04 +0000 (+0000) Subject: Try alpha blending the conservation paths X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=commitdiff_plain;h=f83153e9925aee1b167fae0235865d97ba6b7f04 Try alpha blending the conservation paths It was too easy to lose selected tracks behind other, later drawn, tracks. Perhaps alpha blending will let us see them better. --- diff --git a/alg/glseqbrowser.cpp b/alg/glseqbrowser.cpp index d7d60aa..470c7c4 100644 --- a/alg/glseqbrowser.cpp +++ b/alg/glseqbrowser.cpp @@ -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); }