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
       rendertarget

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
       rendertarget. For segments that have been allocated outside the	normal
       define_recordtarget   through explicitly	allowing target_alloc  and ac-
       cept_target  to create output segments, these lack a rendertarget asso-
       ciation	and  will  thus	 not  produce  any  output, only work as event
       queues. For these edge cases, they can be rebound to a rendertarget al-
       location.

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			  April	2022		  rendertarget_bind(3)

NAME | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLE | SEE ALSO:

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

home | help