Strange Behavior in draw() Loop with Processing 3

Hi folks, I have a sketch that works fine in Processing 2.x under Windows 7 on a laptop with an NVIDIA card. I installed Processing 3 on another laptop with Windows 7 but having only the Intel HD graphics adapter - just to play around with P3. Curiously when I run the same sketch on this laptop it works fine if I include a background() statement inside the draw() loop - but does not run correctly if I comment out the background() statement. Stripping out all the other code, the following simple draw() loop retains the same run/fail characteristics.

void draw() { // background(255); for (int gY=0; gY<height; gY+=gsize) { for (int gX=0; gX<width; gX+=gsize) { pushMatrix(); translate(gX, gY); fill(getColor(gX,gY),4); // get a color for this location rect(0, 0, gsize, gsize); popMatrix(); } } }

The above loop runs fine when the background statement is not commented out. However, once I comment out the background() statement, I get the following error:

Framebuffer error (unknown error), rendering will probably not work as expected Read for help. OpenGL error 1286 at bot beginDraw(): invalid framebuffer operation

Does anyone have any suggestions or insights into why the presence/absence of a background() statement inside the draw loop makes a difference? Note that the link referenced above contains no relevant information.

Sign In or Register to comment.