Original Post
Hi I have the following code: glLoadName(1); glPointSize(30); glBegin(GL_POINTS); glVertex2f(x,y); glEnd(); When using the selectionbuffer, I only get a hit if I pick near (x,y), or exactly on it. Picking positions like, for instance, (x+10,y) is invalid. If I instead use GL_POLYGON to draw the square, it works fine. Then I can select the figure in all its coordinates. How come? My picking code: GLuint selectBuf[512]; GLint hits; GLint viewport[4]; glGetIntegerv(GL_VIEWPORT, viewport); glSelectBuffer(512, selectBuf); glRenderMode(GL_SELECT); glInitNames(); glPushName(0); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); gluPickMatrix(x, viewport[3]-y, 5.0, 5.0, viewport); gluOrtho2D(x1,x2,y1,y2); drawFigures(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glFlush(); hits = glRenderMode(GL_RENDER); Kind Regards Andreas