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

## gSPLineW3D

Syntax

    #include <ultra64.h> /* gbi.h */
    gSPLineW3D(Gfx *gdl, s32 v0, s32 v1, s32 wd, s32 flag)
    gsSPLineW3D(s32 v0, s32 v1, s32 wd, s32 flag)

Arguments

- gdl is the display list pointer.

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

- wd is the line width (0~255, in half-pixel units).

- flag is the line flat-shading index (0~1):
  0 (draws line using the v0 color.)
  1 (draws line using the v1 color.)

Explanation
Generates one line with the specified width using the vertices v0, v1 loaded in the vertex buffer by the gSPVertex macro. The line width wd is specified in half-pixel units. Note that when the line is actually generated, 1.5 pixel (the minimum line width) is added to this specified width. In other words, specifying 0 half-pixels draws a 1.5 pixel-wide line, specifying 1 half-pixel (0.5-pixel) draws a 2.0 pixel-wide line, specifying 2 half-pixels (1 pixel) draws a 2.5 pixel-wide line, etc. For other features of this macro, see gSPLine3D. This macro works only when line microcode (L3DEX, L3DEX2) is loaded.

For details, please see Section 11.9.2, "Lines" in the N64 Online Programming Manual.

Note
Because lines are rendered as trapezoids, when you draw thick lines there is sometimes a notable difference in thickness at the two "caps" of the trapezoid (the two ends of the line).

See Also
gSPLine3D
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