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





gSPClearGeometryMode

Syntax
#include <ultra64.h> /* gbi.h */
gSPClearGeometryMode(Gfx *gdl, u32 mode)
gsSPClearGeometryMode(u32 mode)
Arguments
  • gdl is the display list pointer.

  • mode is 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)
Explanation
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.

Comment
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 and gSP2Triangles. 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
gSPSetGeometryMode]

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