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

   

gSPNumLights

Format
#include "gbi.h"

gSPNumLights(Gfx *gdl, int n)
gsSPNumLights(int n)
Arguments
  • gdl is the pointer to the graphics display list
  • n is the number of diffuse lights to light (NUMLIGHTS_0, NUMLIGHTS_1, NUMLIGHTS_2, ..., NUMLIGHTS_7)
What This Macro Does
It tells the RSP how many lights are to be used in lighting calculations. Use it in conjunction with the gSPLight macro, which actually loads the lights to be used. Note that any time the lighting state is altered with gSPLight the gSPNumLights macro must be used to tell the RSP that the lights have been changed (even if the number of lights has not changed).

When only ambient lights are used, use NUMLIGHTS_0, set the first light to be black and the second light to be the ambient color.

The best way to define static lights is to use the gdSPDefLights macro followed by the gSPSetLights macro (instead of using gSPLight and gSPNumLights explicitly).

See Also
gdSPDefLights
gSPLight
gSPSetLights



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