ArrayList<PGraphics> arrl = new ArrayList<PGraphics>();
void setup(){
size(screen_w,screen_h);
background(255,255,255);
arrl.add(createGraphics(screen_w,screen_h));
}
void draw(){
image(arrl.get(0),0,0);
}
Line 10 results in a NullPointerException.
I've tried replacing all PGraphics with PImage, and createGraphics(...) with createImage(...,RGB), and it gives me no problems.