Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Meesa

Picking an object / Object selection

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

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

Share this post


Link to post
Share on other sites
Advertisement
It is suppose to be WindowCView.viewport. Is it a problem when developing it in SDI application instead of glut application?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!