UFO: Alien Invasion
|
Go to the source code of this file.
Data Structures | |
struct | light_s |
a light source More... | |
struct | sustain_s |
sustains are light flashes which slowly decay More... | |
Macros | |
#define | MAX_STATIC_LIGHTS 1024 |
Typedefs | |
typedef struct light_s | light_t |
typedef struct sustain_s | sustain_t |
sustains are light flashes which slowly decay More... | |
Functions | |
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) More... | |
void | R_AddSustainedLight (const vec3_t org, float radius, const vec3_t color, float sustain) |
void | R_UpdateSustainedLights (void) |
Updates state of sustained lights; should be called once per frame right before world rendering. More... | |
void | R_EnableWorldLights (void) |
Set up lighting data for the GLSL world shader. More... | |
void | R_EnableModelLights (const light_t **lights, int numLights, bool inShadow, bool enable) |
Enable or disable realtime dynamic lighting for models. More... | |
void | R_DisableLights (void) |
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) More... | |
void | R_ClearStaticLights (void) |
Remove all static light data. More... | |
void | R_UpdateLightList (struct entity_s *ent) |
#define MAX_STATIC_LIGHTS 1024 |
Definition at line 47 of file r_light.h.
Referenced by R_AddStaticLight().
Create light to be rendered in the current frame (will be removed before the next)
Definition at line 36 of file r_light.cpp.
References light_s::color, Com_DPrintf(), DEBUG_RENDERER, rendererData_t::dynamicLights, i, MAX_GL_LIGHTS, rendererData_t::numDynamicLights, light_s::origin, light_s::radius, refdef, and VectorCopy.
Referenced by CL_ParticleRun2(), and R_UpdateSustainedLights().
Add static light for model lighting (world already got them baked into lightmap)
Definition at line 261 of file r_light.cpp.
References light_s::color, Com_DPrintf(), Com_Printf(), DEBUG_RENDERER, MAX_STATIC_LIGHTS, rendererData_t::numStaticLights, light_s::origin, light_s::radius, refdef, rendererData_t::staticLights, and VectorCopy.
Referenced by SP_light().
Definition at line 58 of file r_light.cpp.
References light_s::color, i, sustain_s::light, MAX_GL_LIGHTS, light_s::origin, r_sustainArray, light_s::radius, refdef, sustain_s::sustain, sustain_s::time, rendererData_t::time, and VectorCopy.
Referenced by CL_ParticleRun2().
Remove all static light data.
Definition at line 300 of file r_light.cpp.
References rendererData_t::numStaticLights, and refdef.
Referenced by R_ModBeginLoading(), and R_SetDefaultState().
Definition at line 282 of file r_light.cpp.
References i, MAX_GL_LIGHTS, and MIN_GL_CONSTANT_ATTENUATION.
Enable or disable realtime dynamic lighting for models.
lights | The lights to enable |
numLights | The amount of lights in the given lights list |
inShadow | Whether model is shadowed from the sun |
enable | Whether to turn realtime lighting on or off |
Definition at line 149 of file r_light.cpp.
References light_s::color, defaultMaterial, rstate_s::dynamic_lighting_enabled, GLPositionTransform(), i, cvar_s::integer, rstate_s::lighting_enabled, MAX_GL_LIGHTS, rendererData_t::modelAmbientColor, light_s::origin, R_DisableAttribute(), r_dynamic_lights, R_EnableAttribute(), r_locals, R_ProgramParameter3fv(), R_ProgramParameter3fvs(), R_ProgramParameter4fvs(), r_programs, r_state, R_UseMaterial(), light_s::radius, refdef, rendererData_t::sunDiffuseColor, rendererData_t::sunVector, Vector4Set, VectorCopy, and rlocals_s::world_matrix.
Referenced by R_DrawAliasModel(), and R_DrawMaterialSurfaces().
Set up lighting data for the GLSL world shader.
Definition at line 108 of file r_light.cpp.
References light_s::color, rendererData_t::dynamicLights, GLPositionTransform(), i, cvar_s::integer, MAX_GL_LIGHTS, rendererData_t::numDynamicLights, light_s::origin, r_dynamic_lights, R_EnableAttribute(), r_locals, R_ProgramParameter3fvs(), R_ProgramParameter4fvs(), r_programs, light_s::radius, refdef, Vector4Set, VectorCopy, and rlocals_s::world_matrix.
Referenced by R_RenderAlphaTestBspRRefs(), and R_RenderOpaqueBspRRefs().
Updates state of sustained lights; should be called once per frame right before world rendering.
Definition at line 83 of file r_light.cpp.
References light_s::color, i, sustain_s::light, MAX_GL_LIGHTS, light_s::origin, R_AddLight(), light_s::radius, refdef, sustain_s::sustain, sustain_s::time, rendererData_t::time, and VectorScale.
Referenced by R_RenderFrame().