gSPClearGeometryMode

gSPClearGeometryMode [Macro]

Function

gSPClearGeometryMode

Disables the geometry pipeline modes

Syntax

#include <ultra64.h>        /* gbi.h */
gSPClearGeometryMode(Gfx *gdl, u32 mode)
gsSPClearGeometryMode(         u32 mode)

Arguments

gdl
the display list pointer.
mode
the Geometry pipeline mode:
G_SHADE (Calculate vertex color)
G_LIGHTING (Calculate lighting)
G_SHADING_SMOOTH(Gouraud shading)
G_ZBUFFER (Calculate Z buffer)
G_TEXTURE_GEN(Automatically generate texture s,t coordinates)
G_TEXTURE_GEN_LINEAR (Automatically generate texture s,t coordinates)
G_CULL_FRONT (Front-face culling)
G_CULL_BACK (Back-face culling)
G_CULL_BOTH (Front-face and back-face culling)
G_FOG (Generate vertex alpha coordinate fog parameters)
G_CLIPPING (Clipping)

Description

gSPClearGeometryMode disables the geometry pipeline modes for culling, lighting, specular highlights, reflection mapping, fog, etc. To enable these various modes, use gSPSetGeometryMode. For details about the different modes, see gSPSetGeometryMode.

Note

By disabling G_CLIPPING, processing time can be reduced because the data required for clipping decisions does not need to be calculated by gSPVertex. Also, clipping is not performed in gSP1Triangle, gSP2Triangles, and gSP1Quadrangle. Note what effects can result: In the display list shown below, the data required for clipping cannot be obtained, so the behavior of gsSP1Triangle cannot be guaranteed.

gsSPClearGeometryMode(G_CLIPPING),  // Disable clipping.
gsSPVertex(v, 3, 0),                   // Load 3 vertices.
gsSPSetGeometryMode(G_CLIPPING),       // Enable clipping.
gsSP1Triangle(0, 1, 2, 0),             // Draw a triangle.

In the same way, the process will not run correctly even if the vertices that were loaded when clipping was disabled were specified by gSPCullDisplayList.

See Also

gDPSetPrimColor, gSP1Triangle, gSPFogPosition, and gSPSetGeometryMode

Revision History

02/01/99 Completely rewritten.