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

FreeBSD Manual Pages

  
 
  

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

NAME
       image_sharestorage - Setup two VIDs to use the same texture store.

SYNOPSIS
       bool
       image_sharestorage( vid:src, vid:dst )

DESCRIPTION
       A  vid contains a number	of metadata states such	as position and	orien-
       tation, along with the idea of a	'storage' which	is the textual,	 image
       or  external  source tied to the	vid. As	a means	of preventing multiple
       views of	the same storage, this function	can be used to share the stor-
       age of vid as the storage of dst.

NOTES
       1      Texture coordinates are initially	copied over but	are  otherwise
	      managed separately in each object.

       2

	      WORLDID	 is  a	valid src argument, ( WORLDID  as dst is unde-
	      fined) but any surface that shares storage with WORLDID	should
	      not be part of a visible rendertarget.

       3      Video  image  post  processing (scale, flips and filtermode) are
	      bound to the texture store and not to any- single	object.

       4      Using a broken or	empty vstore as	src will convert dst into  the
	      equivalent  of  a	 null_surface. Using a color surface will copy
	      the colour values	and the	assigned shader.

       5      Sharing into a dst  that is also used as the storage for a  ren-
	      dertarget	 will  invalidate the state of the rendertarget	and an
	      explicit

	      rendertarget_forceupdate	will be	called.

       6      There is no ordering  imposed  in	 rendertarget  updates,	 which
	      means that a store that is used as the destination for a render-
	      target  will  need  to have all dependent	rendertargets manually
	      updated in the preframe stage or the result of  using  vid  that
	      shares backing store with	a rendertarget will be undefined.

       7      persistent objects and instances cannot be used as dst.

EXAMPLE
       function	image_sharestorage0()
	     a = load_image("test.png");
	     b = null_surface(64, 64);
	     move_image(b, 100,	100);
	     show_image({a, b});
	     image_sharestorage(a, b);
       end

MISUSE
       function	image_sharestorage0()
	     image_sharestorage(b, a);
       end

MISUSE
       function	image_sharestorage1()
	     persist_image(a);
	     image_sharestorage(a, b);
       end

SEE ALSO:
       instance_image(3) null_surface(3)

image				  April	2025		 image_sharestorage(3)

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

home | help