gSPViewport.3p 1.04 KB
.TH gSPViewport 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gSPViewport, gsSPViewport
\- load viewport projection parameter
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"

typedef struct {
	short	vscale[4];	/* scale, 2 bits fraction */
	short	vtrans[4];	/* translate, 2 bits fraction */
	/* both the above arrays are padded to 64-bit boundary */
} Vp_t;

typedef union {
	Vp_t 		vp;
	long long int	force_structure_alignment;
} Vp;

gSPViewport(Gfx *gdl, Vp *v)

gsSPViewport(Vp *v)
.fi
\fP
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I v
viewport pointer (segmented address).
vscale is the scale applied to the normalized homogeneous coordinates after 4x4 projection transformation.
vtrans is offset added to the scaled number.
Both of these numbers are in screen coordinates.
Array indices of 0, 1, 2 correspond to x,y,z. An array index of 3 is used for padding.
.SH DESCRIPTION
The
.I gsSPViewport
command sets up the viewport region of the graphics pipeline.
.I vc
and
.I vo
are S13.2 numbers.
.SH SEE ALSO
.TP 10
.IR gDPSetScissor (3P)