I was wondering whether there is a way to detect a touch in an OpenGL rendered scene. What I have i a set of images which are being rendered in my main view. Now if the user touches one of these images (or objects) I would like to know which one was touched - similar to the
CGRectContainsPoint(frame, [touch locationInView:self.view]
method.
Is there an easy way to find out? If there is none, this开发者_如何学运维 would also help.
See the picking and selecting FAQ. This of course assumes that you do indeed have a full-blown OpenGL implementation, I don't think that the OpenGL ES spec (for instance) includes selection support.
精彩评论