Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: picking

  1. #1


    im trying to write code for picking one of a number of objects on the screen. when i then try to move or change the picked object all the objects seem to move as if they were all picked. What am i doing wrong? is there some different way i should set up my objects?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000

    Re: picking

    Any transformation you do is affecting everything you draw, until you reset the transformation again.

    What you need to do is to apply the transformations on the specific object only, and restore the transformation when you are done with that object. Use glPushMatrix and glPopMatrix to save and restore transformations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts