Quantcast
Viewing all articles
Browse latest Browse all 941

PGraphics and Android : very slow, even with simple sketch

Hi,

When I'm running this very simple sketch on a Samsung tab A (2016), frameRate is around 8fps, even with a very simple sketch as this one :

PGraphics pg;
void setup() {
  size(displayWidth, displayHeight, P2D);
  pg=createGraphics(width, height);
}

void draw() {
  println("fps : ", frameRate);
  pg.beginDraw();
  pg.stroke(0);
  pg.ellipse(width/2, height/2, 300, 300);
  pg.endDraw();
  image(pg, 0, 0, width, height);
}

I tried different render (Default one, P2D, P3D, JAVA2D, OPENGL...), but still.

Do you have any idea where it come from (I have 2 times "OpenGL error 1280 at bot beginDraw(): invalid enum", aswell..) or how to manage things differently? I really need to draw on différent layer, because one has to be refhresh every frame and the other no...

Thanks for your help,

A.


Viewing all articles
Browse latest Browse all 941

Trending Articles