# How to replicate one frame loop?

**URL:** <https://openrndr.discourse.group/t/how-to-replicate-one-frame-loop/448>\
**Category:** How to?\
**Created:** [October 30, 2022, 9:16pm UTC](https://openrndr.discourse.group/t/how-to-replicate-one-frame-loop/448 "2022-10-30T21:16:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![finalfire](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/finalfire/32/425_2.png) [@finalfire](https://openrndr.discourse.group/u/finalfire)\
**Post date:** [October 30, 2022, 9:16pm UTC](https://openrndr.discourse.group/t/how-to-replicate-one-frame-loop/448/1 "2022-10-30T21:16:26Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![abe](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/abe/32/700_2.png) [@abe](https://openrndr.discourse.group/u/abe)\
**Post date:** [October 31, 2022, 8:20am UTC](https://openrndr.discourse.group/t/how-to-replicate-one-frame-loop/448/2 "2022-10-31T08:20:38Z")

</div>

Hi hi! Welcome to the forum! 🙂

I’ve used your same approach in the past. It’s also possible to add [`PresentationControl.MANUAL`](https://guide.openrndr.org/advancedTopics/presentationControl.html).

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](https://github.com/openrndr/orx/tree/master/orx-no-clear) which is a frequent request coming from Processing.

---

<div class="post-metadata">

**Author:** ![finalfire](https://yyz2.discourse-cdn.com/free1/user_avatar/openrndr.discourse.group/finalfire/32/425_2.png) [@finalfire](https://openrndr.discourse.group/u/finalfire)\
**Post date:** [October 31, 2022, 3:32pm UTC](https://openrndr.discourse.group/t/how-to-replicate-one-frame-loop/448/3 "2022-10-31T15:32:27Z")

</div>

Many thanks for your exhaustive reply!
