Animation frame delay in Android


#1

Hi guys,

I don’t know what is causing this problem but when I build an animation project for android the frames of the animation are like slow motion when I run the application in the phone. I built the same project in Windows and the frames are perfect. The device I’m using is Samsung Galaxy S5 and I guess it shouldn’t be a hardware problem because the phone is very fast with every other application that I have installed.
What’s the reason that is causing this ? Is it a Juce problem with android or something else ?

Thanks.


#2

Try using OpenGLContext attachTo.


#3

Thanks, it work’s fine now but was this the main reason ?


#4

The software renderer is super slow on Android and using OpenGL gives a big performance increase. iOS has Core Graphics that I believe the software renderer uses on those platforms so there is often no advantage to use OpenGL there.


#5

Thanks, i’ll keep that in mind. :wink:


#6

I’m hoping this will solve my problem too on Android, but so far no.

I have an animation rendered using component refreshes. When I add:
openGLContext.attachTo(*this);
I now see two versions of the animation running, and the background of the component appears rendered opaque. Furthermore, there is flickering of the animation. BUT it is much smoother :slight_smile:

Is there something that is needed to setup the OpenGLContext object which I may be missing? Is there any problem having more than one of these objects present in an app, or should i pass around one object - does it make a difference?

Any help with this, gratefully received!