• Advertisement
Sign in to follow this  

Picking Performance

This topic is 4032 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

Would it be completely stupid to call a picking algorithm everytime the user moves his mouse to work out what part of a shape the user's cursor is hovering over? Is there a massive performance hit doing it this way, or is it a viable option?

Share this post


Link to post
Share on other sites
Advertisement
That depends on how efficient the picking algorithm is, and how much time you can allot to it. It's not an unreasonable thing to do.

Share this post


Link to post
Share on other sites
Sorry, I should have been more specific. This is by rendering in selection mode, using a gluPickMatrix. Just to clarify.

Share this post


Link to post
Share on other sites
In that case the performance will depend on how many vertices your card will have to transform and how many fragments it will have to rasterize since you effectively have to render your scene twice. As long as you do the obvious stuff like frustum culling, turn off textures, lighting and other unneeded states, and use a lower LOD mesh, you should be just fine with this method.

Share this post


Link to post
Share on other sites
Also, consider only re-picking every 2-4 frames. The latency will generally be unnoticeable.

Share this post


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

  • Advertisement