View Full Version : gluUnProject?
05-08-2000, 10:01 AM
I have a glutSolidSphere that I wish to disappear if I click it, but then I have to translate the worldcoordinates to x, y coordinates. And how do I do that? With gluUnProject, and in that case, how???
05-10-2000, 09:23 AM
Or should I do this with glReadPixels, but then I won't be able to change the color of the thing I wish to "click", or will I?
well, translating world coordinates to xy coordinates is projection, so you'd use gluProject. glu*UN*project reverses that process, and converts xy screen and z coordinate into its corresponding world coordinate.
if you want to know if you're clicing the sphere, i'd guess you'd use the selection mode http://www.opengl.org/discussion_boards/ubb/wink.gif
hope this helps
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.