How to invoke the P2DX rendering

Hi, I have a processing sketch built via Processing 3.3.7/8 in Windows under Android Mode. It basically displays a live pulse waveform from Bluetooth data received from a sensor module. It works just fine on most Android devices I have tested, but is distinctly slow on one or two.
I have updated Processing to P3.4, and the new Android Mode, as well as the latest SDK. I was hoping to try out the new experimental P2DX renderer, but can’t see how to invoke it. It isn’t as simple as using fullScreen(P2DX). Processing says P2DX is an unknown variable. Can anyone help?

I’m not a Processing developer, just a Processing user. If users are being invited to try out the experimental rendering introduced in the latest Android Mode (4.0.3) then there needs to be some way for us to actually select it. As far as I can tell, the relevant documentation hasn’t been updated yet, and my initial sortie into the source code wasn’t exactly revealing. :cry:

Am I missing something? (Entirely possible!)

OK, sussed it. It was ridiculously easy.

P2D, P3D etc are string constants whose value is a path to a rendering file. Looking at the source code for the Android Mode 4.0.3 showed the path, so I just replaced the non-working fullscreen(P2DX); with fullscreen(“processing.opengl.PGraphics2DX”); and the sketch compiled and ran with no issues.

The rendering itself is a little iffy, and I haven’t tried any speed testing yet, but this is where I wanted to be at this stage. :grin:

1 Like