Sign in to follow this  

About selection and feedback

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

OK,I know that we can use the selection and feedback method to pick the Object , But I don't know what it was in the selectBuffer after feedback.(GLuint selectBuf[BUFSIZE];) I mean what it is the buffer compose by? Oh,Forgive my poor English.

Share this post


Link to post
Share on other sites
GLuint selectBuf[BUFSIZE]; gives the picked objects id (=name in OpenGL).
When you render your scene for picking, you have to affect at each object you want to able the picking an id (int), using glLoadName() ;

There is an example in glut: Glut\progs\demos\gliq

Share this post


Link to post
Share on other sites
If you're using the selection buffer for picking purposes, and you aren't stacking names by pushing/popping, it should look something like this:

selectBuf[n+0] = 1, indicating no pushing/popping is going on
selectBuf[n+1] = minimum Z value
selectBuf[n+2] = maximum Z value
selectBuf[n+3] = name

I'm not familiar with the feedback mode, so if that's what you're looking for, disregard what I just said.

However, be warned: using the selection buffer [glRenderMode(GL_SELECT)] on ATI cards will have very poor performance results if the number of triangles being drawn is more than trivial. I believe the same applies when using it for feedback. I contacted ATI about it with little/no response. It works fine on NVidia cards, though.

Share this post


Link to post
Share on other sites

This topic is 4478 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.

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