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

   

gSPSetGeometryMode
gSPClearGeometryMode

Format
#include "gbi.h"

gSPSetGeometryMode(Gfx *gdl,
   unsigned int mode)
gsSPSetGeometryMode(unsigned int mode)

gSPClearGeometryMode(Gfx *gdl,
   unsigned int mode)
gsSPClearGeometryMode(unsigned int mode)
Arguments
  • gdl is the pointer to the graphics display list
  • mode specifies the geometry pipeline modes. The following modes are bit OR'ed together and set or cleared depending on the macro:

    • G_SHADE RSP calculates the color at the vertices of a triangle. Do not enable this when using the primitive color to specify the color for a triangle.
    • G_LIGHTING enables lighting calculations.
    • G_SHADING_SMOOTH enables Gouraud shading. If this is not enabled, the color for a triangle is flat shaded. The color of the triangle is determined by the color of one of its vertices. See gSP1Triangle. If you set this mode, you must also set G_SHADE.
    • G_ZBUFFER enables Z-Buffer calculations. You may also need to set other Z-Buffer parameters for the framebuffer.
    • G_TEXTURE_GEN enables the automatic generation of the texture coordinates s and t. A spherical mapping is used, based on the normal.
    • G_TEXTURE_GEN_LINEAR enables the automatic generation of the texture coordinates s and t.
    • G_CULL_FRONT enables culling the front-facing polygons.
    • G_CULL_BACK enables culling the back-facing polygons.
    • G_CULL_BOTH enables culling both the front and back-facing polygons.
    • G_FOG enables generation of fog parameters for the vertex alpha coordinate.
What These Macros Do
The gSPSetGeometryMode macro turns on geometry pipeline modes, and gSPClearGeometryMode clears the modes.

Note
There are other elements of the RSP rendering state that have their own macros. In those cases, either the state change is more complex than a single bit, or there is an optimization for the RSP geometry engine that requires a different macro.

See Also
gSPFogPosition
gDPSetPrimColor
gSP1Triangle



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 January 1998