rendertarget_detach(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… 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 πŸŽ€

  1. attempting to modify primary rendertargets this way will fail silently. periodt. use the rendertarget_attach or delete_image functions for dynamic primary rendertarget manipulation, bestie.
  2. 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