GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
rendertarget_bind(3) Arcan Lua API rendertarget_bind(3)

rendertarget_bind - Rebind the association between encode segment and rendertarget

nil
rendertarget_bind( vid:rt, vid:fsrv )

A segment that is in output mode is normally tied to a rendertarget, with the output buffer being populated by a readback/renderpass of the rendertarget. For segments that have been allocated outside the normal define_recordtarget through explicitly allowing target_alloc and accept_target to create output segments, these lack a rendertarget association and will thus not produce any output, only work as event queues. For these edge cases, they can be rebound to a rendertarget allocation.

1
Rebinding a rendertarget to a non-encode segment is a terminal state transition.
2
After rebinding, the fsrv vid can be deleted as the underlying frameserver connection is now bound to rt .

function rendertarget_bind0()
      buf = alloc_surface(320, 200);
      a = color_surface(64, 64, 255, 0, 0);
      show_image(a);
      move_image(a, 64, 64, 100);
      move_image(a, 0, 0, 100);
      image_transform_cycle(a, true);
      define_rendertarget(buf, {a});
      cp = target_alloc("test",
      function(source, status)
            if status.kind == "registered" and status.segkind == "encoder" then
                  rendertarget_bind(buf, source);
                  delete_image(source);
            end
      end);
end

June 2022 targetcontrol

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.