How to replicate one frame loop?

Hello there! I’m starting using OPENRNDR and I wonder if there is a way to draw on screen only once. This can be achieved in other creative coding enviroments such as Processing or Nannou. For instance, in the former it is enough to draw everything in the the setup() function.

I just replicated this behavior in Kotlin by creating the objects within the program block, and then draw them in the extend block, but I wonder if there is any other way to do it. Thank you!

Hi hi! Welcome to the forum! :slight_smile:

I’ve used your same approach in the past. It’s also possible to add PresentationControl.MANUAL.

Another thing I do often is to draw everything to a RenderTarget (like a PGraphics in Processing), maybe in a computationally heavy process, then only draw the result (the ColorBuffer in the RenderTarget) inside extend.

Also take a look into orx/orx-no-clear at master · openrndr/orx · GitHub which is a frequent request coming from Processing.

1 Like

Many thanks for your exhaustive reply!

1 Like