1scene_gap(3)                    Allegro manual                    scene_gap(3)
2
3
4

NAME

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

SYNOPSIS

10       #include <allegro.h>
11
12
13       extern float scene_gap;
14

DESCRIPTION

16       This number (default value = 100.0) controls the behaviour  of  the  z-
17       sorting  algorithm.  When  an  edge  is very close to another's polygon
18       plane, there is an interval of uncertainty in  which  you  cannot  tell
19       which object is visible (which z is smaller). This is due to cumulative
20       numerical errors for edges that have undergone a lot of transformations
21       and interpolations.
22
23       The  default  value  means  that if the 1/z values (in projected space)
24       differ by only 1/100 (one percent), they are considered to be equal and
25       the  x-slopes of the planes are used to find out which plane is getting
26       closer when we move to the right.
27
28       Larger values means narrower margins,  and  increasing  the  chance  of
29       missing  true  adjacent  edges/planes. Smaller values means larger mar‐
30       gins, and increasing the chance of mistaking close polygons  for  adja‐
31       cent  ones.   The  value  of  100 is close to the optimum. However, the
32       optimum shifts slightly with resolution, and may be  application-depen‐
33       dent. It is here for you to fine-tune.
34
35
36
37

SEE ALSO

39       create_scene(3),   clear_scene(3),  destroy_scene(3),  render_scene(3),
40       scene_polygon3d(3)
41
42
43
44Allegro                          version 4.4.2                    scene_gap(3)
Impressum