Generates one line
#include <ultra64.h> /* gbi.h */ gSPLine3D(Gfx *gdl, s32 v0, s32 v1, s32 flag) gsSPLine3D( s32 v0, s32 v1, s32 flag)
This macro generates one line with a width of 1.5 pixels using the vertices v0, v1 loaded in the vertex buffer by the gSPVertex macro. To specify the line width, use gSPLineW3D. For details, please see Section 11.9.2, "Lines" in the N64 Programming Manual. This macro works only when line microcode (L3DEX, L3DEX2) is loaded.
When line microcode is loaded, the gSP1Triangle macro is interpreted as NOOP and not processed. Also, some geometry states cannot be used (i.e., the geometry pipeline modes G_CULL_FRONT, G_CULL_BACK and G_CULL_BOTH in gSPSetGeometryMode). (F3DLX2.Rej, however, does support G_CULL_FRONT and G_CULL_BOTH). Only a few of the RDP's render modes are valid for drawing lines. The most typical modes used are RM_AA_XLU_LINE and RM_AA_ZB_XLU_LINE (see g*DPSetRenderMode). When you use RM_AA_ZB_XLU_LINE, the Z-Buffer can be read but it cannot be written to. For this reason, lines must be drawn after Z-buffered polygons. For details, please see Section 15.7.3, "Transparent Lines, XLU_LINE" in the N64 Programming Manual. To learn more about the rendering modes, see g*DPSetRenderMode and <gbi.h>.
Since the line microcode changes the RDP scissoring coordinates (see g*DPSetScissor), the drawing area (the scissoring box) must be reset for the next display list. The exception is with the F3DEX2 microcode, where drawing can be performed without resetting the scissoring box.
02/01/99 Entirely revised.