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

FreeBSD Manual Pages


home | help
scene_gap(3)			Allegro	manual			  scene_gap(3)

       scene_gap - Number controlling the scene	z-sorting algorithm behaviour.
       Allegro game programming	library.

       #include	<allegro.h>

       extern float scene_gap;

       This number (default value = 100.0) controls the	behaviour  of  the  z-
       sorting	algorithm.  When  an  edge  is very close to another's polygon
       plane, there is an interval of uncertainty in  which  you  cannot  tell
       which object is visible (which z	is smaller). This is due to cumulative
       numerical errors	for edges that have undergone a	lot of transformations
       and interpolations.

       The  default  value  means  that	if the 1/z values (in projected	space)
       differ by only 1/100 (one percent), they	are considered to be equal and
       the  x-slopes of	the planes are used to find out	which plane is getting
       closer when we move to the right.

       Larger values means narrower margins,  and  increasing  the  chance  of
       missing	true  adjacent	edges/planes. Smaller values means larger mar-
       gins, and increasing the	chance of mistaking close polygons  for	 adja-
       cent  ones.  The	value of 100 is	close to the optimum. However, the op-
       timum shifts slightly with resolution, and  may	be  application-depen-
       dent. It	is here	for you	to fine-tune.

       create_scene(3),	  clear_scene(3),  destroy_scene(3),  render_scene(3),

Allegro				 version 4.4.3			  scene_gap(3)


Want to link to this manual page? Use this URL:

home | help