gSPBranchLessZrg

gSPBranchLessZrg [Macro]

Function

gSPBranchLessZrg

Conditionally branches the display list (specifies minimum/maximum values of Z)

Syntax

#include <ultra64.h>        /* gbi.h */
gSPBranchLessZrg(
        Gfx *gdl,
        Gfx *branchdl,
        u32 vtx,
        f32 zval,
        f32 near,
        f32 far,
        s32 flag,
        s32 zmin,
        s32 zmax)
gsSPBranchLessZrg(
        Gfx *branchdl,
        u32 vtx,
        f32 zval,
        f32 near,
        f32 far,
        s32 flag,
        s32 zmin,
        s32 zmax)

Arguments

gdl
the display list pointer.
branchdl
the pointer to the display list branch.
vtx
the vertex (index in the vertex buffer).
zval
the Z value which becomes the branch condition.
near
the location of the near plane (a value specified by either guPerspective or guOrtho)
far
the location of the far plane (a value specified by either guPerspective or guOrtho)
flag
the projection method:
G_BZ_PERSP (Perspective projection).
G_BZ_ORTHO (Orthogonal projection).
zmin
the minimum value of Z (= vp.vtrans[2] - vp.vscale[2])
zmax
the maximum value of Z (= vp.vtrans[2] + vp.vscale[2])

Description

This macro can specify the minimum/maximum values of Z (zmin/zmax) and conditionally branch the display list. Most applications use a Z value that is greater than 0 and less than G_MAXZ/2. This macro is used when this range needs to be changed. When no change is necessary, please use g*SPBranchLessZ. For details, see gSPBranchLessZ.

See Also

gSPBranchLessZ

Revision History

02/01/99 Entirely revised.