   glRenderMode(GL_SELECT)
  Hi there!all this setup works wonderfully for 3d objects but once there is an ortho primitive, no 3d elements can be picked! wherever i click, the ortho primtive is always return as a hit!what im im doing wrong?here s the code:void OpenGL::SetPicking(Actor *in_actor, Primitive *in_primitive, Int in_x, Int in_y){Int l_precision = 4;GLint l_viewport[4];GLuint l_buffer[512];glGetIntegerv(GL_VIEWPORT, l_viewport);glSelectBuffer(512, l_buffer);glMatrixMode(GL_PROJECTION);glPushMatrix();glLoadIdentity();glRenderMode(GL_SELECT);gluPickMatrix(in_x, m_height - in_y, l_precision, l_precision, l_viewport);if (in_primitive->IsOrtho())glOrtho(0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f); // Left, Right, Bottom, Top, zNear, zFar.elsegluPerspective(m_currentCamera->GetFovy(), m_currentCamera->GetAspect(), m_currentCamera->GetZNear(), m_currentCamera->GetZFar());SetClientStates(in_primitive);Transform(in_actor, in_primitive);Draw(in_primitive);UnTransform(in_actor, in_primitive);glMatrixMode(GL_PROJECTION);glPopMatrix();Int l_hit = glRenderMode(GL_RENDER);if (l_hit != 0){in_primitive->SetMinDepth(l_buffer[1]);in_primitive->SetMaxDepth(l_buffer[2]);m_picking.push_back(in_actor);}}m_witdh and m_height are the window size, in_x and in_y are the mouse position!Transform and Untransform push and pop matrices for the respective element either in 2d or 3d mode...any help would be nice!Thx[Edited by - golgoth on January 4, 2006 10:13:18 AM]