I study way to transform from mouse click point in the screen coordinate to virtual 3d world coordinate.
Of course, use OpenGL.
I googled key words,catched usefull API.
It's glReadPixels and glUnProject, To use glReadPixels with specified GL_DEPTH_COMPONENT format gives me depth value, and depth value and x,y in screen coordinate transform to 3d world coordinate by calling glUnProject.
Subscribe to:
Post Comments (Atom)
 


No comments:
Post a Comment