why using createGraphics OPENGL/P3D in draw function cannot get the pixels

void setup(){ size(500,500,P2D);

PGraphics3D pgOK = (PGraphics3D) createGraphics(width,height,OPENGL); pgOK.beginDraw(); pgOK.background(255); pgOK.endDraw(); println(pgOK.pixels == null); //false pgOK.dispose(); }

void draw(){ PGraphics3D pgErr = (PGraphics3D) createGraphics(width,height,OPENGL); pgErr.beginDraw(); pgErr.background(255); pgErr.endDraw(); println(pgErr.pixels == null); //true pgErr.dispose(); noLoop(); }

when save to an image file, it always get a totally black image, when convert to BufferedImage it's the same result!

Sign In or Register to comment.