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

## gSP1Triangle [Macro]

Syntax

    #include <ultra64.h> /* gbi.h */

    gSP1Triangle(Gfx *gdl, s32 v0, s32 v1, s32 v2, s32 flag)
    gsSP1Triangle(         s32 v0, s32 v1, s32 v2, s32 flag)

Arguments

- gdl Display list pointer
- v0, v1, v2 Vertex buffer index:

  F3DEX F3DEX.NoN F3DLX F3DLX.NoN L3DEX | 0~31
  | F3DLX.Rej | 0~63
  | F3DLP.Rej | 0~79

  * For the F3DEX2 microcode group (F3DEX2/F3DLX2/F3DLP2/L3DEX2), the values are as follows:

  F3DEX2 F3DEX2.NoN F3DLX2 F3DLX2.NoN L3DEX2 | 0~31
  | F3DEX2.Rej | 0~63
  | F3DLX2.Rej | 0~63

- Triangle face flag 0~2

Explanation
It generates a single triangle face (using the vertices v0, v1, and v2) in the internal vertex buffer loaded by the gSPVertex macro. The flag (0, 1, or 2) identifies which of the three vertices contains the normal or the color for the face (for flat shading). For details, see Section 11.9.1 "Triangles" in the N64 Programming Manual.
Caution:

The actual type of triangle drawn (shaded, textured, Z-Buffered, and so on) is determined by the current RSP rendering state.

See Also
gSP2Triangles, 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, 1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1999