gSPLineW3D

gSPLineW3D [Macro]

Function

gSPLineW3D

Generates one line with the specified width

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
the display list pointer.
v0, v1
the vertex buffer indices (0~31).
wd
the line width (0~255, in half-pixel units).
flag
the line flat-shading index (0~1):
0 (draws line using the v0 color.)
1 (draws line using the v1 color.)

Description

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

02/01/98 Entirely revised.