annotation
"@ClearColor"
"@ClearColor(0xRRGGBB) handler Draw phase Render { … }"
@ClearColor(N) declares the framebuffer clear colour (a 0x00RRGGBB integer) so the engine owns the per-frame clear and present: at the top of the Render phase it clears the framebuffer to N, and after all Render handlers run it presents the frame — so a game's Render handler carries no Screen.clear / Screen.show boilerplate, and the colour is configured declaratively rather than written in the handler body. It is opt-in: a program with no @ClearColor is byte-for-byte identical (it clears and presents itself, or the light system owns the present). Place it on the program's Render handler (or any declaration — it is program-wide). The argument is any constant expression — a hex literal, a Color.* name, or a const from your palette.
Example
program ClearColorDemo {
property Tag { n: int = 0 }
model P { Tag }
@ClearColor(0x102030)
handler Draw phase Render {
Screen.fill_rectangle(10, 10, 4, 4, 0xffffff)
}
}