简体   繁体   中英

Touch differences between opengles10 and opengles20

I am writing a 3D viewer which loads some 3D file and displays it simply on a GLSurfaceView.

I originally implemented the viewer in opengles10, however since this is a fixed function api, I was not able to use shaders, and since have moved to opengles20.

A few questions here:

When I load similar models with opengles10 on my HTC desire, things are quick, touch events are as expected mathematically and the model rotates/translates/zooms easily.

However when I use opengles20, my touch events cause hell. I know this because on a onFling event, I rotate my model with a damping factor. This is smooth in all cases.

So :

1) Why in opengles20 do I need to worry about vsyncs and double buffering and a choreographer ??

2) How do i implement double buffering or swap buffers with opengl if the buffers are not available to me ??

3) Is this the only reason for the performance difference ??

4) Finally, what can I do to equate these two ?? An upgrade from opengles10 to opengles20 isn't really a great update if my UI is laggy

Following up on my own question here :

I've decided to use RENDERMODE_CONTINUOUSLY for my rendermode; this allows opengl to swap buffers anytime it can and re-draw.

I also moved my logic for applying rotations/translation to matrices outside the drawing loop.

And lastly, to get all this to play nicely, introduced a mutex to synchronize on, that way updating rotations/translation is thread safe against the opengles thread

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM