Rendering to PGraphics with classes that do their own drawing?
in
Programming Questions
•
1 month ago
So I'm trying to use PGraphics to get a buffer for Syphon. My main program calls three separate classes' "run" function, and each class draws itself within those functions. How do I get those classes to be rendered into the PGraphics object? Do I have to have some sort of return value on the individual "run" functions? Perhaps return another PGraphics object? Quite confused. So my code essentially looks like this right now-
void draw(){
canvas.beginDraw();
object1.run();
object2.run();
object3.run();
canvas.endDraw();
}
1