rendertarget_detach(3)
π rendertarget_detach β bye-bye secondary attachments π
okay so bestie, this is the rendertarget_detach page from the Arcan Lua API (section 3), and it's literally here to help you remove secondary specific-object attachments from a rendertarget. slay.
β¨ NAME β¨
rendertarget_detach β remove any secondary specific-object attachments from a rendertarget. no cap, that's the whole vibe.
π¦ SYNOPSIS π¦
nil
rendertarget_detach( rtgt, vid )
πΈ DESCRIPTION πΈ
so here's the tea: functions that attach video objects to rendertargets β whether through rendertarget creation or dynamically β let the primary attachment of an object be modified. and that primary attachment is the one responsible for life-cycle management and similar properties, iykyk.
using the RENDERTARGET_NODETACH, those same functions can create secondary attachments, wherein a video object will be processed for multiple rendertargets. iconic behaviour honestly.
this function can be used to dynamically undo secondary attachments. it's giving cleanup era π
π NOTES π
- attempting to modify primary rendertargets this way will fail silently. periodt. use the
rendertarget_attachordelete_imagefunctions for dynamic primary rendertarget manipulation, bestie. - attempting to detach from rendertargets where the specified object does not exist will not result in any state transitions. so likeβ¦ nothing happens. no drama, no changes. π«Ά
π₯ EXAMPLE π₯
here's the example, preserved exactly because we do not play about code:
function rendertarget_detach0()
local rtgt = alloc_surface(64, 64);
local obj_a = color_surface(32, 32, 0, 255, 0);
rendertarget_attach(rtgt, obj_a, RENDERTARGET_NODETACH);
show_image({rtgt, obj_a});
move_image(rtgt, 64, 0);
rendertarget_detach(rtgt, obj_a);
end
π SEE ALSO π
targetcontrol
mwah π β this cutie comes from source/version targetcontrol, dated October 2026, and it's rendertarget_detach(3) signing off. π
π¦ 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