Pinch-Zoom with GLSurfaceView

I have the following problem -

I am developing an application and I decided to use GLSurfaceView because I need openGl for a better and more natural animation of page curl.

Having achieved this, now I am a bit difficult, since I can not find any tutorial for implementing scalable scaling in GLSurfaceView. I captured the event, finger spacing, zoom, etc. But I do not know how to perform the actual conversion.

I found the ImageView transform through a matrix, but alas ...

Has anyone done scaling in openGl?

I don’t think there is a need to publish the code, but I will do it if it answers you back.

+6
source share
1 answer

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

+7
source

Source: https://habr.com/ru/post/895075/


All Articles