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

FreeBSD Manual Pages

  
 
  

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

NAME
       persist_image - Flag the	video object as	video context persistant.

SYNOPSIS
       bool
       persist_image( vid )

DESCRIPTION
       Some  objects, and especially those linked to frameservers, may need to
       survive otherwise aggressive operations like push_video_context .  This
       function	 attempts  to  promote	the referenced object to such a	state.
       This ability comes with several restrictions however. In	practice,  ob-
       jects  that  are	linked,	has a frameset or in other ways	maintain hori-
       zontal references (within the same context) are prohibited  from	 being
       flagged as persistant.

EXAMPLE
       function	persist_image0()
	     a = fill_surface(32, 32, 255, 0, 0);
	     b = fill_surface(32, 32, 0, 255, 0);
	     show_image({a, b});
	     assert(persist_image(a) ==	true);
	     push_video_context();
       end

MISUSE
       function	persist_image0()
	     a = fill_surface(32, 32, 255, 0, 0);
	     b = fill_surface(32, 32, 0, 255, 0);
	     show_image({a, b});
	     persist_image(a);
	     push_video_context();
	     delete_image(a);
       end

MISUSE
       function	persist_image1()
	     a = fill_surface(32, 32, 255, 0, 0);
	     b = fill_surface(32, 32, 0, 255, 0);
	     show_image({a, b});
	     persist_image(a);
	     link_image(a, b);
       end

MISUSE
       function	persist_image2()
	     a = fill_surface(32, 32, 255, 0, 0);
	     b = fill_surface(32, 32, 0, 255, 0);
	     show_image({a, b});
	     persist_image(a);
	     link_image(b, a);
       end

MISUSE
       function	persist_image3()
	     a = fill_surface(32, 32, 255, 0, 0);
	     b = fill_surface(32, 32, 0, 255, 0);
	     show_image({a, b});
	     persist_image(a);
	     c = instance_image(a);
	     push_video_context();
       end

SEE ALSO:
       push_video_context(3) pop_video_context(3)

image				  April	2025		      persist_image(3)

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

home | help