rendertarget_noclear(3)
π rendertarget_noclear β the Arcan Lua API one, bestie
okay so real talk, this is rendertarget_noclear(3), straight out of the Arcan Lua API, and it's lowkey one of those tiny functions that does one thing and does it iconically.
β¨ NAME β¨
rendertarget_noclear β turn the "clear the rendertarget before a renderpass" behaviour on or off. That's it. That's the whole vibe. π
π¦ SYNOPSIS π¦
success
rendertarget_noclear( vid, noclear )
πΈ DESCRIPTION πΈ
so by default, every single pass for a rendertarget starts by clearing the buffer it's about to draw to. like, every time, no asking, just yeet the pixels.
and that's fine! except π it can waste memory bandwidth if you already know the entire rendertarget is gonna get fully populated by the objects you're drawing anyway. why clear a thing you're about to completely cover? exactly. that's the moment rendertarget_noclear walks in.
it changes that behaviour β you set a true value to a vid that's connected to a rendertarget, and boom, the clearing dips. slay. β¨
π NOTES π
- setting
WORLDIDasvidwill change the clear behaviour for the standard output rendertarget. main character energy, honestly. - okay this one's important, no cap: if the background is not actually covered by valid
VIDs, you will leave trails of previous frames behind. that's theMAINexample below, and it's giving ghosting. mind the trails. π
π₯ EXAMPLE π₯
function rendertarget_noclear0()
rendertarget_noclear(WORLDID, true);
a = color_surface(64, 64, 255, 0, 0, 0);
show_image(a);
move_image(a, 128, 128, 10);
end
π MISUSE π
function rendertarget_noclear0()
rendertarget_noclear(BADID, "potatoe");
end
not the "potatoe" π bestie, BADID and a string of all things. this is what we in the business call not it. π
π that's a wrap π
this page came to you courtesy of targetcontrol, dated October 2026 β and it's the rendertarget_noclear(3) manual page, so go forth and clear responsibly (or don't, that's literally the point π«Ά). π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms