gDPSetPrimDepth.3p
1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.TH gDPSetPrimDepth 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPSetPrimDepth, gsDPSetPrimDepth
\- set primitive depth (z) in the RDP.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"
gDPSetPrimDepth(Gfx *gdl, int z, int dz)
gsDPSetPrimDepth(int z, int dz)
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I z
z value.
.TP
.I dz
delta z value.
.SH DESCRIPTION
This command sets the depth (and delta z) to be used for the
entire primitive in the RDP.
The Z format used in the blender is a 0,15.3 fixed point number.
The primitive Z is a 16 bit register.
If the depth source is set to
.B
G_ZS_PRIM,
the top bit is ignored and the remaining 15 bits of the primitive Z register
provide the 15 integer bits for the Z value.
When using primitive Z, the fractional bits will be zero.
The delta Z format used in the blender is a 16 bit number.
The primitive delta Z can provide all 16 bits.
.PP
Note that the Z value is converted to a 14 bit quantity and the delta Z value
is converted to a 4 bit quantity for storage into the Z buffer.
For details on how the Z values are used and stored, please see
.I NU64 Programming Manual.
.SH SEE ALSO
.IR gDPSetPrimColor (3P)
.IR gDPSetDepthSource (3P)