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
|
gSPSetLightsMSyntax#include "gbi.h" typedef struct { Ambient a; Light l[M]; } LightsM; gSPSetLightsM(Gfx *gdl, LightsM lites) gsSPSetLightsM(LightsM lites)Arguments
It loads light structures for ambient and diffuse lights into the light buffer. The last character in the macro, indicated by M above, represents the number of diffuse lights in the scene. In the macro and in the LightsM structure, M must be an actual integer in the range of 0 to 7. For example, with three diffuse lights, the macro is gSPSetLights3 and the corresponding structure is Lights3. Once the lights are activated, they remain on until the next call to gSPSetLightsM. Whenever a new structure of lights is activated, the old structure of lights is overwritten. In the LightsM structure, Ambient a is the ambient light structure, and Light l[M] is an array of M diffuse light structures. The LightsM structure can be set up by calling gdSPDefLights with the parameters defining the lights as inputs. The individual light structures combine the color of the light with the color of the material. Note To change the color of some or all of the lights after the light has been used one or more times, you should use the more efficient gSPLight macro instead of the less efficient gSPSetLightsM macro. See gSPLight for more information about this. See Also gdSPDefLights gSPLight gSPLightColor
|