bf_control(3G)
NAME
bf_control − activate or deactivate attributes for back-facing polygons.
SYNOPSIS
C Syntax:
void bf_control ( fildes, rev_normals, attr );
int fildes, rev_normals, attr;
FORTRAN77 Syntax:
subroutine bf_control ( fildes, rev_normals, attr )
integer*4 fildes, rev_normals, attr
Pascal Syntax:
procedure bf_control ( fildes, rev_normals, attr:integer );
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
rev_normals Specifies whether or not subsequent polygons should have normals that face in the reverse direction as well as the normal direction.
If TRUE (1), any normals associated with polygons can point in either direction when light source equations are applied. The normal pointing more towards the light is used for computation.
If FALSE(0), normals extend only in the normal direction.
attr Specifies whether or not the backsides of polygons should be rendered with different attributes than those of the front sides.
If TRUE (1), back-facing polygons are rendered with the back-facing polygon attributes.
If FALSE(0), back-facing polygons are rendered with the front-facing polygon attributes.
Discussion
The rev_normals flag is useful in the case where facet normals are being calculated for polygons whose vertices are not arranged in a consistently clockwise or counter-clockwise order, and the facet normal is to be used in the light source equation (see vertex_format procedure). It is also useful for polygons that are to be viewed as two-sided surfaces.
If attr is TRUE, polygons that are back-facing with respect to the viewpoint are rendered by the light source equations using polygon or vertex normals pointing in the opposite direction and a new set of attributes. The attributes include the fill color specified by bf_fill_color (3G), perimeter color specified by bf_perimeter_color (3G), interior style specified by bf_interior_style (3G), and the shading model specified by bf_surface_model (3G) and bf_surface_coefficients (3G). Note, back-facing polygons derive their vertex colors from the back-face polygon fill color, not from colors supplied with each vertex. If back-face cull is enabled by the hidden_surface(3G) cull parameter, any subsequent call to bf_control with attr TRUE has no effect because back-face cull remains active.
This routine replaces backface_control which, although still supported, is not recommended because it modifies only the fill color of the back-facing polygons.
DEFAULTS
rev_normals = FALSE (0).
attr = FALSE (0).
SEE ALSO
Starbase Reference: fill_color(3G), hidden_surface(3G), interior_style(3G), perimeter_color(3G), perimeter_repeat_length(3G), perimeter_type(3G), surface_coefficients(3G), surface_model(3G).
Starbase Device Drivers Manual.
Hewlett-Packard Company — November 03, 1994