View Full Version : glRotate and Picking problem
03-19-2002, 06:59 PM
I am rotating my objects with rubber band mechanism. But , after that i am not able to pick the object . So, What was the problem . I am not getting .
So, please help me .
Thanks in advance.
Dude, we need way more details about your problem. You simply said you had a problem with picking, and that's not much of a description.
03-20-2002, 06:58 PM
My code looks like this
glTranslatef(transX, transY, 0.0);
glRotatef(rotX, rotY, rotZ);
And , for picking , I am using the gluPickMatrix routine . So, when I translate by dragging the mouse, I am not able to pick the translated object.
unless I'm mistaken once you've popped the matrix you've removed the info from the current matrix, so you really can't pick the object. I think you gotta have the gluPickMatrix routine work before you use glPopMatrix();
not sure though. Probably why i cruise at the beginners forum... http://www.opengl.org/discussion_boards/ubb/wink.gif
03-21-2002, 07:15 AM
Selection uses the current matrix. So if you pop the matrix you will have changed it from the one you drew with. You definately need to do the selection before calling glPopMatrix.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.