N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

gDPSetPrimDepth

Format
#include "gbi.h"

gDPSetPrimDepth(Gfx *gdl,
   int z, int dz)
gsDPSetPrimDepth(int z,
   int dz)
Arguments
  • gdl is the pointer to the graphics display list
  • z is the z value
  • dz is the delta z value
What This Macro Does
It 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 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. With primitive Z the fractional bits are zero. The delta Z format used in the blender is a 16-bit number. The primitive delta Z can provide all 16 bits.

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 the N64 Programming Manual.

See Also
gDPSetPrimColor
gDPSetDepthSource



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998