Drawing on Android has become laggy in plugin demo


#1

Hi, not sure when this started but drawing, e.g. knobs, has become laggy and jumpy on Android. Seems ok on other platforms. Thought I might have done something in my app to start with but just tried the plugin demo and it’s the same. However, the Juce Demo is fine.

Same behaviour in emulator as well as on my tablet (Asus Zenpad 10).


#2

We have already discussed this, but I’m going to post it here for others too.

In order to have good drawing performance on Android, one should use OpenGL renderer. JUCE demo uses OpenGL on Android by default (but the renderer can still be switched to the software one by going to Tabs & Widgets demo, Look-and-feel menu - the renderer options are at the bottom of the menu).

To enable OpenGL drawing:

  • ensure juce_opengl module is included in Projucer
  • add OpenGLContext openGLContext; member to your ProcessorEditor class
  • in the constructor of your ProcessorEditor call openGLContext.attachTo (*getTopLevelComponent());
  • in the destructor of your ProcessorEditor call openGLContext.detach();

We will look into ways of ensuring that OpenGL is always used on Android by default, so that you don’t have to do it manually.


#3

@fabian - welcome back, hope you had a good break.

Although this issue has been addressed by enabling OpenGL I’d just like to bring it to your attention anyway as you may have some input - at some point the software rendered became unusable even though it used to be fine. I still have old .apks on my device using the software renderer which work fine up until a certain point.

Not sure how concerned you guys are about this but thought i might be something you wanted to be aware of anyway.

Cheers