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

FreeBSD Manual Pages

  
 
  

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

NAME
       rendertarget_metrics - Retrieve statistics about	the state of a render-
       target pipeline

SYNOPSIS
       table
       rendertarget_metrics( vid:rtgt )

DESCRIPTION
       At  times  you might want to make a decision based on the generic state
       of a pipeline. A	common case is post processing filters	that  are  too
       expensive  to  apply on every frame. The	easiest	approach then has been
       to attach it to a lower refresh clock, but that creates visible latency
       in the effect that might	be quite visible and might still update	redun-
       dantly.

       The other option	is to have a preframe handler that determines if it is
       worthwhile to add more work to the queue	or not,	and in order  to  make
       such a heuristic	some input is needed. This function can	be used	to re-
       trieve  some  information  about	 what is going on in a render pipeline
       without forcing manual tracking.

       The fields in the returned table	are: *int:dirty* - how many times  the
       dirty  counter has been incremented since last render pass. *int:trans-
       fers* - the number of external uploads since last render	pass. *int:up-
       dates* -	the number of ongoing transforms. *int:time_move* - the	 rela-
       tive  clock of the last move transform. *int:time_scale*	- the relative
       clock of	the last scale transform.  *int:time_rotate*  -	 the  relative
       clock  of  the  last  rotate transform. *int:time_blend*	- the relative
       clock of	the last blend transform.

EXAMPLE
       function	rendertarget_metrics0()
	     local anim	= fill_surface(32, 32, 255, 0, 0)
	     show_image(anim, 100)
	     move_image(anim, 100, 100,	200)
	     _G[APPLID .. "_preframe_pulse"] = function()
		   for k,v in pairs(rendertarget_metrics(WORLDID)) do
			 print(k, v)
		   end
	     end
       end

SEE ALSO:
targetcontrol			  April	2025	       rendertarget_metrics(3)

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

home | help