UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
r_light.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 1997-2001 Id Software, Inc.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
23
*/
24
25
#pragma once
26
27
struct
entity_s;
28
29
typedef
struct
light_s {
30
vec3_t
origin
;
31
vec4_t
color
;
32
float
radius
;
33
}
light_t
;
34
36
typedef
struct
sustain_s {
37
light_t
light
;
38
float
time
;
39
float
sustain
;
40
}
sustain_t
;
41
42
/* cap on number of light sources that can be in a scene; feel free
43
* to increase if necessary, but be aware that doing so will increase
44
* the time it takes for each entity to sort the light list at each
45
* frame (this is based on the number of lights actually used, not
46
* the max number allowed) */
47
#define MAX_STATIC_LIGHTS 1024
48
50
void
R_AddLight
(
const
vec3_t
origin
,
float
radius,
const
vec3_t
color);
51
void
R_AddSustainedLight
(
const
vec3_t
org,
float
radius,
const
vec3_t
color,
float
sustain);
52
void
R_UpdateSustainedLights
(
void
);
53
void
R_EnableWorldLights
(
void
);
54
void
R_EnableModelLights
(
const
light_t
**
lights
,
int
numLights,
bool
inShadow,
bool
enable);
55
void
R_DisableLights
(
void
);
56
57
void
R_AddStaticLight
(
const
vec3_t
origin
,
float
radius,
const
vec3_t
color);
58
void
R_ClearStaticLights
(
void
);
59
void
R_UpdateLightList
(
struct
entity_s* ent);
origin
voidpf uLong int origin
Definition
ioapi.h:45
lights
static light_t * lights[LIGHTMAP_MAX]
Definition
lightmap.cpp:285
R_AddSustainedLight
void R_AddSustainedLight(const vec3_t org, float radius, const vec3_t color, float sustain)
Definition
r_light.cpp:58
R_AddStaticLight
void R_AddStaticLight(const vec3_t origin, float radius, const vec3_t color)
Add static light for model lighting (world already got them baked into lightmap).
Definition
r_light.cpp:261
R_ClearStaticLights
void R_ClearStaticLights(void)
Remove all static light data.
Definition
r_light.cpp:300
R_EnableModelLights
void R_EnableModelLights(const light_t **lights, int numLights, bool inShadow, bool enable)
Enable or disable realtime dynamic lighting for models.
Definition
r_light.cpp:149
R_UpdateSustainedLights
void R_UpdateSustainedLights(void)
Updates state of sustained lights; should be called once per frame right before world rendering.
Definition
r_light.cpp:83
R_AddLight
void R_AddLight(const vec3_t origin, float radius, const vec3_t color)
Create light to be rendered in the current frame (will be removed before the next).
Definition
r_light.cpp:36
R_UpdateLightList
void R_UpdateLightList(struct entity_s *ent)
R_DisableLights
void R_DisableLights(void)
Definition
r_light.cpp:282
R_EnableWorldLights
void R_EnableWorldLights(void)
Set up lighting data for the GLSL world shader.
Definition
r_light.cpp:108
light_t
a light source
Definition
r_light.h:29
light_t::color
vec4_t color
Definition
r_light.h:31
light_t::origin
vec3_t origin
Definition
r_light.h:30
light_t::radius
float radius
Definition
r_light.h:32
sustain_t
sustains are light flashes which slowly decay
Definition
r_light.h:36
sustain_t::sustain
float sustain
Definition
r_light.h:39
sustain_t::light
light_t light
Definition
r_light.h:37
sustain_t::time
float time
Definition
r_light.h:38
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
vec4_t
vec_t vec4_t[4]
Definition
ufotypes.h:40
src
client
renderer
r_light.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0