fastest way to draw millions of lines?

hi, i’m trying to create a multi-platform tractography visualization tool, to visualize datasets such as this:

basically, each dataset contains hundreds of thousands of “streamlines” which are just a bunch of connected line segments (typically, 50-100 points per streamline).

i’ve tried using immediate mode (GL.Lines) but the performance is quite poor, i also downloaded the fastLineRenderer asset and it didn’t really improve much on my device, and i hear that vectrosity is much the same.

i was wondering if there is a faster way to draw lines (or any shape for that matter) than GL.Lines immediate mode, in the onPostRender method? based on some other applications i’ve seen that do the same thing i’m trying to do, i should be getting 5-10x faster than what i’m getting with GL.Lines. i’ve read that VBOs may help, but i don’t know much about them or if its even worth getting into.

thanks

You can make Mesh objects with line geometry. I would go that route. When you set the indices, just choose MeshTopology.Lines.

But for an image like the one you linked, you’re going to have a very hard time getting that to render in real-time, I think.