zbuffer_switch(3G)
NAME
zbuffer_switch − enable section of display surface for Z-buffer hidden surface removal
SYNOPSIS
C Syntax:
void zbuffer_switch ( fildes, pass );
int fildes, pass;
FORTRAN77 Syntax:
subroutine zbuffer_switch ( fildes, pass )
integer *4 fildes, pass
Pascal Syntax:
procedure zbuffer_switch ( fildes, pass:integer );
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
pass Number specifying which pass of the user data is to be expected.
Discussion
If multiple passes of the user data are needed to do complete hidden surface removal, the frame buffer is divided into vertical strips and rendered one at a time. The number of strips is determined by the hidden_surface procedure. When this procedure is called, the Z-buffer is cleared and the clip limits are set to the intersection of the current clip rectangle and the rectangle defining the requested strip of frame buffer as defined by the pass parameter. Pass 1 renders the left-most strip and subsequent passes render strips left to right. This procedure should be called even when multiple passes are not necessary in order to clear out the Z-buffer. This is usually done whenever clear_view_surface or dbuffer_switch is called.
Some devices which have dedicated Z-buffers support clearing of the Z-buffer simultaneously with the display. This can result in much better performance and should be used instead of zbuffer_switch whenever possible. To clear the Z-buffer when clear_view_surface is called, clear_control must be called with CLEAR_ZBUFFER included in the mode parameter. While this mode is enabled zbuffer_switch will not clear the Z-buffer. See clear_control for details.
DEFAULTS
pass 1 is expected.
SEE ALSO
Starbase Reference: clear_control(3G), clear_view_surface(3G), hidden_surface(3G).
Starbase Graphics Techniques.
Hewlett-Packard Company — November 03, 1994