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

FreeBSD Manual Pages

  
 
  

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

NAME
     rendertarget_range - Limit the order- range of objects to render

SYNOPSIS
     bool:ok
     rendertarget_range( vid:rtgt, int:min, int:max )

DESCRIPTION
     In  some  render- and optimization scenarios one might want to only allow a
     certain set of objects to be rendered. Normally object hierarchies are  or-
     dered  based  on an order value, see order_image  and the default rendering
     pipeline will process these objects according to that order, going from low
     to high. Using this function, a rendertarget (including the special WORLDID
     ) can be set to skip values that fall outside min <= val <=  max.	The  ob-
     jects  will  still  have external storage and similar processing being syn-
     chronized, they will just not be considered when generating the  rendertar-
     get output.

NOTES
     1	    if	min or max is set to < 0 or max < min, the rendertarget will re-
	    set to the default mode of everything being processed.

     2	    if max == min, nothing will be drawn.

EXAMPLE
     function rendertarget_range0()
     -- in this example, only the green object will be visible
	   local red = color_surface(64, 64, 255, 0, 0);
	   local green = color_surface(64, 64, 0, 255, 0);
	   local blue = color_surface(64, 64, 0, 0, 255);
	   show_image({red, green, blue});
	   move_image(green, 0, 64);
	   move_image(blue, 64, 0);
	   order_image(green, 5);
	   rendertarget_range(WORLDID, 4, 6);
     end

SEE ALSO:
     define_rendertarget(3) order_image(3) image_inherit_order(3)

targetcontrol			   August 2026		   rendertarget_range(3)

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

home | help