Render without displaying for performance

Is it possible to render frames without having to display them?
Would this be faster than normal rendering (with JAVA2D or P2D)? (i.e. with saveFrame)

The only way I can think of, is to use PGraphics. They are the same as normal Processing canvas, but function as an image.

a thing to keep in mind is that you need to use graphic.begin/endDraw(); to change them. The rest is in the link provided.

As for performance, I have no idea. It is SLIGHTLY faster since displaying a black canvas is faster than an image but I don’t know by how much. Probably depends on the GPU you have.

1 Like