Original Post
I am trying to implement object selection using gluPickMatrix().
I am developing my program using SDI application in .NET. OpenGL is drawn in CView.
I have a problem of getting viewport value glGetIntegerv(GL_VIEWPORT,viewport). It does not return valid value.
I skipped the above problem when using gluPickMatrix with the value of CView width and height
gluPickMatrix((double)x,(double)(WindowCView.viewport[3]-y),5.0,5.0f,WindowCView.viewport);
However, the hits returned (hits=glRenderMode(GL_RENDER)) is always zero.
I have followed the steps described in the redbook. Any idea is really appreciated.
Many thx in advanced