Processing 2.0a6 createGraphics
in
Core Library Questions
•
1 year ago
Hi all,
In the 2.0a6 the following seems to throw a null reference exception. I guess this is because when using P2D it creates a PGraphics2D class which inherits from PGraphicsOpenGL, which in the documentation says you cannot use opengl to create a buffer. Is this sort of use now longer possible or am I just missing some initialisation call?
Thanks!
import processing.opengl.*;
PGraphics _buf;
void setup(){
_buf = createGraphics(100,100,P2D);
}
void draw(){
_buf.beginDraw();
_buf.endDraw();
}
1