objective c - Iphone opengl es - glu, glPushName -
using iphone , objective c im trying find plane has been clicked/touched in opengl view. typically use glpushname/ flpopname function doesn't seem implemented in sdk or defined in . know there useful functions or way object clicked?
opengl es doesn't support these functions. you'll have find way pick. either:
render solid faces distinct colors low-res buffer. select render buffer resolution pick square occupies 3x3 pixel grid, choose either color in center pixel, or color occupies edge pixels.
determine pick geometrically. entails placing geometry in bsp of sort , doing interesection tests ray emanating downwards screen, starting tapped pixel.
determine pick analytically. if geometry simple and/or regular enough, might able use straightforward math find out tapped.
Comments
Post a Comment