gSP2Triangles

gSP2Triangles [Macro]

Function

gSP2Triangles

Draws 2 triangles

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
v00, v01, v02
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
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, and v02.
flag1
The triangle surface flag for the second triangle (0~2)

Description

It 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 verticev10, v11, v12.

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 g*SP1Triangle.

See Also

gSP1Triangle, gSPVertex

Revision History

02/01/98 Entirely revised.