I am at the end of my rope with doing selection under gl. Right now I am using
the basic gl seleciton technique as follows:
// set up the name stack
gluPickMatrix((GLdouble)xPos1, (GLdouble)viewport - yPos1, (GLdouble) 2, (GLdouble) 2, viewport);
// set either orthographic or perspective
// translate to camera’s position in scene
// Draw the scene - calling glLoadName before each object drawn.
m_scene->draw( GL_SELECT );
glFlush ( );
// Collect the hits
hits = glRenderMode(GL_RENDER);
… process hits …
The problem is that I am getting inconsistant
results. Sometimes I’ll select nothing and
get all but one of my objects back as hits.
One specific case which is mind boggiling is
where I only have 2 quads in a scene. I click
the bottom one and it returns the correct
GLuint as the picked name in the selection
buffer. I select the top one and i get a
return of 1 hit with no name:
hits = 1;
 0 - number of names - wtf?
 0 - min z
 0 - max z
I have seen the same results on a G400 and
a geForce 256 under win2k.
Any Ideas? Anyone?