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





gSPLine3D

Syntax
#include <ultra64.h> /* gbi.h */
gSPLine3D(Gfx *gdl, s32 v0, s32 v1, s32 flag)
gsSPLine3D(s32 v0, s32 v1, s32 flag)
Arguments
  • gdl is the display list pointer.

  • v0, v1 are the vertex buffer indices (0~31).

  • flag is the line flat-shading index (0~1):
    0 (Draws line using the v0 color.)
    1 (Draws line using the v1 color.)
Explanation
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 Online Programming Manual. This macro works only when line microcode (L3DEX, L3DEX2) is loaded.

Note
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 Online 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.

See Also
gSPLineW3D
gSPVertex]

Revision History
2/1/1999 Completely rewritten.


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 March 1999