Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and motionevent.gety (which are in pixel range )to window or Object coordinates of the view?

share|improve this question
    
Screen space coordinates are represented in pixels based on the width/height resolution of the device, and are most likely returned as normalized values. I'm a little confused with what you mean by window or object coordinates. –  Evan Feb 11 '13 at 19:17
1  
thank you for your reply evan have found the answer will post it after couple of hrs as i cannt answer my own question until 8hrs passed. My question anyways was when ever i touch on GLSurfaceview i get coordinates in the form of Motionevent which give x and Y values in pixels. But i need those converted in terms of the coordinates which we pass while drawing on GLSurfaceview. –  deepu Feb 11 '13 at 21:02
    
@deepu Mind posting your solution? –  dbro Feb 3 at 20:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.