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

## gSP2Triangles [Macro]

Syntax

    #include <ultra64.h> /* gbi.h */
    gSP2Triangles(
        gfx *gdl,
        s32 v00,
        s32 v01,
        s32 v02,
        s32 flag0,
        s32 v10,
        s32 v11,
        s32 v12,
        s32 flag1)
    gsSP2Triangles(
        s32 v00,
        s32 v01,
        s32 v02,
        s32 flag0,
        s32 v10,
        s32 v11,
        s32 v12,
        s32 flag1)

Arguments

- gdl Display list pointer
- v0, v1, v2 Vertex buffer index for first triangle

  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

- flag0 The triangle surface flag for the first triangle (0~2)
- v10, v11, v12 Vertex buffer index for second triangle (values same as v00, v01, v02)
- flag1 The triangle surface flag for the second triangle (0~2)

Explanation
gSP2Triangles generates the first triangle using the vertices v00, v01, and v02, loaded into the vertex buffer by the gSPVertex macro, and generates the second triangle using the vertices v10, v11, and v12.
The gSP2Triangles process is illustrated below.
gSP1Triangle(gdl++, v00, v01, v02, flag0);
gSP1Triangle(gdl++, v10, v11, v12, flag1);
Since two g*SP1Triangle macros are processed using one display list, the size of the display list in memory can be reduced. And because F3DLP.Rej and F3DLX.Rej are optimized for gSP2Triangles, using them results in faster processing. To learn more about the features of each triangle, refer to gSP1Triangle.

See Also
gSP1Triangle, 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