1

I am using Canvas for basic 2D graphics in an Android app. I am implementing a drag and drop feature (just setting x/y coordinates of the sprite based on x/y coordinates of the touch event). It works fine, but when testing on my Android device, there can be a slight lag if I move my finger very fast on the screen. The bitmap just isn't keeping up with the touch/drag motion if done quickly.

Would this be improved if I were to move to OpenGL ES? Not wanting to rip out my code if it doesn't.

2 Answers 2

3

This depends basically on the way you implement your drag&drop. A SurfaceView can be fast and there is no need for switching to OpenGL ES just to show 2D...

Find out what causes the lag. If the lag is caused by the touch events aren't fired often enough to be "lag free" that even OpenGL wont help...

4
0

OpenGL is slower on the phones with a software acceleration (e.g. without hardware acceleration). So... :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.