.\"##
.\" $XConsortium: p324,v 5.2 94/04/17 20:58:12 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "SET HLHSR IDENTIFIER" 3P "29 February 1991"
.SH NAME
SET HLHSR IDENTIFIER \- create a structure element to set the
current hidden line/hidden surface removal attribute
.IX "Z-buffering" "SET HLHSR IDENTIFIER"
.IX "Hidden Line/Hidden Surface Removal" "SET HLHSR IDENTIFIER"
.IX "HLHSR" "SET HLHSR IDENTIFIER"
.IX "Special Attributes" "SET HLHSR IDENTIFIER"
.IX "Attributes, Special Attributes" "SET HLHSR IDENTIFIER"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pset_hlhsr_id ( id )
Pint	id;	\fIHLHSR identifier\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
\s-2SET HLHSR IDENTIFIER\s+2 creates a
structure element containing a value for the Hidden Line and Hidden
Surface Removal (\s-2HLHSR\s+2) primitive attribute.
During traversal, this attribute replaces the current \s-2HLHSR\s+2 
identifier and is applied to all output primitives that follow
in the structure network in a workstation-dependent way.
.LP
The \s-2HLHSR\s+2 identifier in the structure network
is used in conjunction with
the \s-2HLHSR\s+2 mode on the workstation during traversal.
Presently, both must be one to enable Hidden Surface Removal.
.LP
If the current edit mode is \s-2INSERT\s+2, then
a \s-2SET HLHSR IDENTIFIER\s+2 element is inserted into the currently open
structure after the element pointed to by the current element pointer. If
the edit mode is \s-2REPLACE\s+2, then the new
\s-2SET HLHSR IDENTIFIER\s+2 element
replaces the element pointed to by the element pointer. In either case, the
element pointer is updated to point to the new element.
.SS C Input Parameter
.IP \fIid\fP
The \s-2HLHSR\s+2 identifier value.  Presently supported values are:
.nf
.sp
.ta .5i +\w'0     'u +\w'PHIGS_HLHSR_ID_ZBUFF_HQ     'u
0	PHIGS_HLHSR_ID_OFF	\fIRemove Nothing\fP
1	PHIGS_HLHSR_ID_ON	\fIRemove Hidden Surfaces and Hidden Lines Using Z-buffer\fP
.sp
.fi
.SS Execution
When the \s-2SET HLHSR IDENTIFIER\s+2 element is traversed, the current 
\s-2HLHSR\s+2 identifier entry in the traversal state list is set to 
\s-2HLHSR\s+2 identifier.  The current \s-2HLHSR\s+2 identifier is applied to output
primitives that follow in the structure network.
The current \s-2HLHSR\s+2 identifier traversal state from the structure
network is compared to the current \s-2HLHSR\s+2 mode on the workstation.
.LP
\s-2HLHSR\s+2 is performed using a \s-2Z\s+2-buffer algorithm.
.LP
The \s-2Z\s+2-buffer processing does not work with primitives filled with
hatches. When a hatched filled area-defining primitive
is to be \s-2Z\s+2 buffered, \s-2PEX-SI\s0 does not apply the \s-2Z\s+2-buffer process.
.LP
The \s-2HLHSR\s+2 mode for a workstation is set with the \s-2SET HLHSR MODE\s+2 function.
The supported \s-2HLHSR\s+2 modes are workstation-dependent.
.LP
For systems without \s-2Z\s+2-buffered hardware, \s-2HLHSR\s+2
is done in software, but with a significant loss of performance.
.LP
A generic problem with \s-2Z\s+2-buffering is that edges on polygons can be
drawn with missing pixels.  
When the high quality \s-2Z\s+2-buffer identifier is used,  \s-2PEX-SI\s0 
attempts to improve the quality of edges on polygons, possibly at the
expense of lower performance.  
The severity of the problem and the amount of improvement
is dependent on the hardware in use.
.SH ERRORS
.IP 005
Ignoring function, function requires state (\s-2PHOP, *, STOP, *\s+2)
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "SET HLHSR MODE (3P)"
.SM "INQUIRE HLHSR FACILITIES (3P)"
.fi
