Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
rendertarget_bind(3)		  Arcan Lua API 	    rendertarget_bind(3)

NAME
     rendertarget_bind	- Rebind the association between encode segment and ren-
     dertarget

SYNOPSIS
     nil
     rendertarget_bind( vid:rt, vid:fsrv )

DESCRIPTION
     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 render-
     target. For segments that	have  been  allocated  outside	the  normal  de-
     fine_recordtarget	  through  explicitly  allowing  target_alloc	 and ac-
     cept_target  to create output segments, these lack a rendertarget	associa-
     tion  and	will thus not produce any output, only work as event queues. For
     these edge cases, they can be rebound to a rendertarget allocation.

NOTES
     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 .

EXAMPLE
     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

SEE ALSO:
targetcontrol			   August 2026		    rendertarget_bind(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rendertarget_bind&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help