Drawing to PApplet.getGraphics(), vs PApplet.g.image.getGraphics()
in
Programming Questions
•
3 years ago
I'm drawing java.awt.Shapes with java.awt.Graphics2D.fill(shape), and I've tried getting the Graphics2D from both PApplet.getGraphics(), and PApplet.g.image.getGraphics().
I've found that using PApplet.getGraphics() is *way* faster, but at the end of Processing's draw() method, it erases my shapes.
I've found that using PApplet.g.image.getGraphics() is way *slower*, but my shapes remain after the draw() method.
What's the difference here? Can I get the speed of the first, but have it not erase my changes? Am I going about this completely wrong?
I've found that using PApplet.getGraphics() is *way* faster, but at the end of Processing's draw() method, it erases my shapes.
I've found that using PApplet.g.image.getGraphics() is way *slower*, but my shapes remain after the draw() method.
What's the difference here? Can I get the speed of the first, but have it not erase my changes? Am I going about this completely wrong?
1