Wiki

Clone wiki

Core / backingMode

Back to Beyond the Codea in-app reference


FunctionIconFunction-Small.png backingMode() function

Introduction

The 'Display' chapter of Codea's in-app reference documents most of the backingMode(MODE) function.

backingMode(STANDARD)

This is the default. Codea draws on to two or three buffers, which are used and shown in rotation. The number of buffers used from time to time is controlled by iOS and is outside the control of Codea.

If the background() function is not used in draw() to clear each buffer as it used in the frame, the rotation of the buffers can result in a flickering effect, as the results of past frames come round again.

backingMode(RETAINED)

In this mode, the contents of the buffer from the previous frame are copied to the current buffer before it is used in the frame. This avoids the flickering effect, but the additional copying reduces the frame rate.

Updated