Rendering large amount of lines

Hi. I need to render complex wireframe created from lines over the model.
Actually I’m in porting OpenGL app where I render lines via glDrawPrimitive ( GL_LINES,…)
How can I do this in Unity ?
GL.Begin(GL.Lines)…GL.Vertex()…GL.End() is not a option – model too complex.

I have an app I’m working on that needs a lot of lines. I purchased the Vetrosity package from the Asset store. I ran a test a couple of days ago with 9000 line in 3D space, each with assigned a random color. On an iPad 3, it was running at 28 - 30 FPS while rotating, so I likely can do many times that number before performance is a problem. I’m not sure what your “large amount is” or what hardware you are targeting.

Assuming you mean glDrawElements - there is no such thing as glDrawPrimitive.

Why is GL.Begin(GL.LINES) not an option? glDrawElements is just a convenience function that in the end does exactly the same.

For example instead of this:

Vector3[] myVertices;
int[] myIndices;
...
glDrawElements(...., myIndices);

, you should be able to do something like this:

Vector3[] myVertices;
int[] myIndices;
...
GL.Begin(GL.LINES);
for(int i=0;i<myIndices.Length;i++)
    GL.Vertex(myVertices[myIndices*]);*

GL.End();