Skip to content

Commit a488fa3

Browse files
authored
Merge pull request #3233 from MRtrix3/fix_track_state
Fix OpenGL state clobbering when rendering streamlines
2 parents 9de7751 + 111b344 commit a488fa3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gui/mrview/tool/tractography/tractogram.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ namespace MR
573573
gl::MultiDrawArrays(mode, &track_starts[buf][0], &track_sizes[buf][0], num_tracks_per_buffer[buf]);
574574
} else if (element_counts[buf] > 0 && element_buffers[buf] != 0) {
575575
// Use the EBO stored with this VAO to render all tracks in this chunk
576+
gl::BindBuffer(gl::ELEMENT_ARRAY_BUFFER, element_buffers[buf]);
576577
gl::Enable(gl::PRIMITIVE_RESTART);
577578
gl::PrimitiveRestartIndex(PRIMITIVE_RESTART_SENTINEL);
578579
gl::DrawElements(gl::LINE_STRIP, element_counts[buf], gl::UNSIGNED_INT, nullptr);

0 commit comments

Comments
 (0)