Jump to content
  • Advertisement
Sign in to follow this  
Alessandro

OpenGL Drawing large amount of GL_LINES (I guess?)

This topic is 2525 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!