Low frame rate on Android

edited April 2016 in Android Mode

Hello

I run a sketch that makes 180 ellipses rotating around a point. each of those ellipses are instances of a Satellite Class that render the ellipse using pushMatrix(), translate(...), rotate(...) and ellipse(...)

Running this sketch on my pc , the FPS is stuck at 60, but running it on my Nvidia Shield K1, I get around 30 FPS

-1- is it that demanding to run 180 objects using primitive shapes ?

I tried with a little more complicated shapes, using 4 primitives, it gets to 22 FPS

I tried using PShape to build Shapes of 4 primitives and it gets to 18 FPS

-2- Am I facing a weakness in Processing for android ?

-3- Is there a way to solve that ?

(I tried using P2D and it crashes with "A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x9e5ad000 in tid 17144 (GLThread 46915)" message)

cheers

update: using a 50x50 PGraphics instead of PShape gets me 11 FPS

update 2: I finally got it to run on P2D (I don't know why, I just copied my whole code, classes and all, to a blank app that was running P2D just fine) and here is the result:

with my 180 satellites being mere ellipses my FPS is 25 :( (with them being points(), I'm back over 60 FPS)

is anybody here ?

Tagged:

Answers

  • Answer ✓

    turns out that, after removing the line

    shapeMode(CENTER);

    the frame rate with P2D got "unleashed" :D

    using CORNERS, CORNER gave the same problem. So it has more to do with shapeMode() than it's parameters.

Sign In or Register to comment.