// init PGraphics3 pg3 = new PGraphics3( 180,180,null ); pg3.defaults(); pg3.format = ARGB; // RGB works as supposed // draw pg3.background( #FFCC00 ); pg3.stroke( #FF0000 ); pg3.fill( #FFFF00 ); pg3.rect( 40,40,100,100 ); // main size( 200,200,P3D ); background( #FFFFFF ); image( pg3,10,10 );