When I removed background…

I recently downloaded codea app. And learn with example codes.

“Lines” example is problem.

When I remove background(10, 10, 20) and run project, previous lines remain indelible.

Why is this happening?

The background command clears the screen so each draw() cycle starts with a clear screen.

Oh thanks.
How can I check the code to see how the background keyword is structured?

When I developing the mobile app, the background does not have a clear function, so I want to check how the background is configured

@Tempnixk I’m not sure what you’re after with background. Basically it does 2 things. The first is to clear the screen of any previous draws to it. The second is to create a background of whatever color you want. So according to the reference, it’s defined as background(r,g,b,a) where each r,g,b,a value is 0 to 255.

PS. I only do Codea (Lua) on the iPad and don’t know anything about Xcode.

1 Like

Thanks for kind answer :slight_smile:

@Tempnixk Most likely a glClearColor followed by glClear.