|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| struct | light_t |
| a light source More... | |
| struct | sustain_t |
| sustains are light flashes which slowly decay More... | |
Macros | |
| #define | MAX_STATIC_LIGHTS 1024 |
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). | |
| 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. | |
| void | R_EnableWorldLights (void) |
| Set up lighting data for the GLSL world shader. | |
| void | R_EnableModelLights (const light_t **lights, int numLights, bool inShadow, bool enable) |
| Enable or disable realtime dynamic lighting for models. | |
| 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). | |
| void | R_ClearStaticLights (void) |
| Remove all static light data. | |
| 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 Com_DPrintf(), DEBUG_RENDERER, i, MAX_GL_LIGHTS, 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_t::color, Com_DPrintf(), Com_Printf(), DEBUG_RENDERER, MAX_STATIC_LIGHTS, light_t::origin, light_t::radius, refdef, and VectorCopy.
Referenced by SP_light().
Definition at line 58 of file r_light.cpp.
References light_t::color, i, sustain_t::light, MAX_GL_LIGHTS, light_t::origin, r_sustainArray, light_t::radius, refdef, sustain_t::sustain, sustain_t::time, and VectorCopy.
Referenced by CL_ParticleRun2().
Remove all static light data.
Definition at line 300 of file r_light.cpp.
References 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_t::color, defaultMaterial, GLPositionTransform(), i, lights, MAX_GL_LIGHTS, light_t::origin, R_DisableAttribute(), r_dynamic_lights, R_EnableAttribute(), r_locals, R_ProgramParameter3fv(), R_ProgramParameter3fvs(), R_ProgramParameter4fvs(), r_programs, r_state, R_UseMaterial(), light_t::radius, refdef, Vector4Set, and VectorCopy.
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_t::color, GLPositionTransform(), i, MAX_GL_LIGHTS, light_t::origin, r_dynamic_lights, R_EnableAttribute(), r_locals, R_ProgramParameter3fvs(), R_ProgramParameter4fvs(), r_programs, light_t::radius, refdef, Vector4Set, and VectorCopy.
Referenced by R_RenderAlphaTestBspRRefs(), and R_RenderOpaqueBspRRefs().
| void R_UpdateLightList | ( | struct entity_s * | ent | ) |
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_t::color, i, sustain_t::light, MAX_GL_LIGHTS, light_t::origin, R_AddLight(), r_sustainArray, light_t::radius, refdef, sustain_t::sustain, sustain_t::time, and VectorScale.
Referenced by R_RenderFrame().