Function
gSPLookAt
Loads a LookAt structure intoRSP
Syntax
#include <ultra64.h> /* gbi.h */
gSPLookAt(Gfx *gdl, LookAt *l)
gsSPLookAt( LookAt *l)
Arguments
Description
gSPLookAt Loads a LookAt structure into the Light buffer in order to perform specular highlighting and reflection mapping. The LookAt structure can be set with the utility commands guLookAtHilite and guLookAtReflect, or it can be set directly with gdSPDefLookAt. The LookAt structure contains colors and the x,y screen coordinates. For details, please see Section 11.7.5.1, Structure Definition" in the N64 Online Programming Manual.
Note
The LookAt structure is shown below:
typedef struct {
unsigned char col[3]; /* Diffuse light value (RGBA) */
char pad1;
unsigned char colc[3];/* Copy of the diffuse light value (RGBA) */
char pad2;
signed char dir[3]; /* Direction toward the light source (normalized) */
char pad3; /* IMPORTANT: "dir" must be less than 127 */
} Light_t;
typedef union {
Light_t l;
long long int force_structure_alignment[2];
} Light;
typedef struct {
Light l[2];
} LookAt;
See Also
gdSPDefLookAt, guLookAtHilite, and guLookAtRelect
Revision History
02/01/99 Entirely revised.