how would i set up a FrameBuffer
such that, i can draw directly to some Texture
or PImage
and then immediatly image that to my screen
for example
PGraphics g2;
void settings() {
size(400, 400, P3D);
}
void setup() {
background(0);
g2 = createGraphics(500,500, P3D);
noLoop();
}
void exit() {
// g2.endDraw();
super.exit();
}
void draw() {
// setup g2 to draw to texture or PImage
g2.beginDraw();
g2.clip(0,0,50,50);
g2.background(0, 128, 128);
image(PImage_Or_Texture, 0, 0);
g2.clip(0,0,25,25);
g2.background(0);
image(PImage_Or_Texture, 0, 0);
g2.clip(35,35,65,65);
g2.background(0, 228, 128);
image(PImage_Or_Texture, 0, 0);
g2.endDraw();
}