Search code examples
androidopengl-esglsurfaceview

Pinch-Zoom with GLSurfaceView


I have a following problem -

I am developing an application and i decided for the GLSurfaceView because i needed openGl for a better and more natural page curl animation.

Having achieved that, now i find myself in a bit of a problem, since i cannot find a tutorial of any kind to implement pinch zoom on GLSurfaceView. I captured the event, the distances between fingers, scale, etc... But i do not know how to perform the actual transformation.

I found the one transforming ImageView via matrix, but alas...

Anyone done pinch zooming in openGl?

I don't think there is any need to post the code, but i will do it if it will nelp you in answering.


Solution

  • you can use the concept of scalegesturedetector to implement Pinch zoom , refer http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html