Drawing large amount of GL_LINES (I guess?)

Started by
1 comment, last by Alessandro 12 years, 4 months ago
I always admired the "Shave and a Haircut" plugin for Maya (some YT movies here): it allows to populate a geometric surface with guide hairs (one for each vertex) and model those very easily with your mouse. Each hair is made of 14 segments, and even having 40000 hairs (so a total of 560000 segments) it's not affecting Maya performances at all.

I wonder how they do that: I believe those shouldn't be simple GL_LINES (I made a simple test applications and with 50000 GL_LINES the performance hit is already consistent and camera operations very slow).
Also, in the "Shave and a Haircut" plugin is possible to pick multiple vertices at once (selected inside a circular area around the mouse) and move those around; also here, I don't believe they use opengl picking pushing and popping so many names...
Any idea about what techniques they might use?
Advertisement
Post some code for how you're doing your test render. I suspect you're far from optimal on the OpenGL side (VBO, VAO, optimized indices, well written shader code, etc) long before we even get the the sophisticated stuff.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Post some code for how you're doing your test render. I suspect you're far from optimal on the OpenGL side (VBO, VAO, optimized indices, well written shader code, etc) long before we even get the the sophisticated stuff.


Hello Promit,
I just tried in immediate mode and using display lists. So the code is really basic, just a loop with a call to the glCallList. So you are suggesting the VAO+VBO's might improve performances? I found this link: "A Vertex Array Object (VAO) is an object which contains one or more Vertex Buffer Objects and is designed to store the information for a complete rendered object"
Would that be a valid technique to use?

This topic is closed to new replies.

Advertisement