UFO: Alien Invasion
Loading...
Searching...
No Matches
r_flare.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void R_CreateSurfaceFlare (mBspSurface_t *surf)
void R_DrawFlareSurfaces (const mBspSurfaces_t *surfs, glElementIndex_t *indexPtr)
 Flares are batched by their texture. Usually, this means one draw operation for all flares in view. Flare visibility is calculated every few millis, and flare alpha is ramped up or down depending on the results of the visibility trace. Flares are also faded according to the angle of their surface to the view origin.

Function Documentation

◆ R_CreateSurfaceFlare()

◆ R_DrawFlareSurfaces()

void R_DrawFlareSurfaces ( const mBspSurfaces_t * surfs,
glElementIndex_t * indexPtr )

Flares are batched by their texture. Usually, this means one draw operation for all flares in view. Flare visibility is calculated every few millis, and flare alpha is ramped up or down depending on the results of the visibility trace. Flares are also faded according to the angle of their surface to the view origin.

Todo
better GL state handling

Definition at line 69 of file r_flare.cpp.

References mBspSurfaces_t::count, default_texcoords, DotProduct, f, mBspSurface_t::flare, mBspSurface_t::frame, i, m, MASK_SOLID, mBspSurface_t::normal, R_BindTexture, R_BlendFunc(), R_Color(), R_DrawArrays(), R_EnableBlend(), R_EnableColorArray(), r_flares, r_flaretextures, r_locals, R_ResetArrayState(), r_state, R_Trace(), refdef, scale, mBspSurfaces_t::surfaces, image_t::texnum, texunit_diffuse, VectorAdd, VectorNormalize(), VectorScale, and VectorSubtract.

Referenced by R_RenderFlareBspRRefs().