Sign in to follow this  
Odiee

glRenderMode(GL_SELECT) is slow?

Recommended Posts

Odiee    100
Hi. I'm doing my selection of objects rendered on screen by using
glPushName(object[c].name);
object[c]->draw();
glPopName();
But this is proving to be very slow. ie I can crash the application by maniacally clicking all over the screen. On slower computers it can wait for a half a second or more just to print the name number. Is this supposed to be so slow or did I do something wrong?

Share this post


Link to post
Share on other sites
Katie    2244
Selection rendermode may be forcing your driver into a software-only rendering. IIRC it's deprecated in OG3 and hence driver developers may not be making any attempt to make it run efficiently.

Depending on your application, you may find there are several replacement options -- one is to use your app side data structures looking for picks instead of having OpenGL do it. Another option is to use transform feedback to do the work on graphics cards. {This option has its own problems revolving around the rather buggy implementations in some OpenGL drivers}.

We've gone for the latter where available, and currently generate bounding boxes around geometry sections. It happens that this is easy in our particular application.

Share this post


Link to post
Share on other sites
Shinpou    140
Yup, I tried doing selection with it to my pet project as well, and it was so ridiculously slow, that I had to scrap the damn thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this