]> icculus.org git repositories - divverent/darkplaces.git/blob - cl_light.h
cleaned up glDrawRangeElements limit checking a bit (now done in gl_backend.c)
[divverent/darkplaces.git] / cl_light.h
1
2 #ifndef CL_LIGHT_H
3 #define CL_LIGHT_H
4
5 // LordHavoc: 256 dynamic lights
6 #define MAX_DLIGHTS             256
7 typedef struct
8 {
9         // location
10         vec3_t  origin;
11         // stop lighting after this time
12         float   die;
13         // color of light
14         vec3_t  color;
15         // brightness (not really radius anymore)
16         float   radius;
17         // drop this each second
18         float   decay;
19         // the entity that spawned this light (can be NULL if it will never be replaced)
20         entity_render_t *ent;
21 }
22 dlight_t;
23
24 // LordHavoc: this affects the lighting scale of the whole game
25 #define LIGHTOFFSET 1024.0f
26
27 extern dlight_t cl_dlights[MAX_DLIGHTS];
28
29 extern void CL_AllocDlight (entity_render_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
30 extern void CL_DecayLights (void);
31
32 #endif
33