PGraphics slow
in
Programming Questions
•
3 years ago
Hi everybody,
the following sketch is giving me a framerate of about 4.
My graphics card is an Nvidia Geforce 8600M GT.
I'm totally surpised that such a simple skech runs so slow. Am i expecting too much or is there something wrng with the way i'm doing this?
Thanks for any support
import processing.opengl.*;
PGraphics pg = null;
public void setup() {
size(1440, 900, OPENGL);
pg = createGraphics(width, height, P2D);
frameRate(60);
}
public void draw() {
background(0);
println("frameRate = " + frameRate);
pg.beginDraw();
pg.fill(255);
pg.rect(mouseX, mouseY, 20, 20);
pg.fill(0, 30);
pg.rect(0, 0, width, height);
pg.endDraw();
image(pg, 0, 0);
}
1