FTEQW
Documentation of the FTE engine source tree.
r_surf.c File Reference

Functions

int Surf_LightmapShift (model_t *model)
 
void QDECL Surf_RebuildLightmap_Callback (struct cvar_s *var, char *oldvalue)
 
void Surf_StainSurf (model_t *mod, msurface_t *surf, float *parms)
 
void Surf_AddStain (vec3_t org, float red, float green, float blue, float radius)
 
void Surf_WipeStains (void)
 
void Surf_LessenStains (void)
 
void Surf_RenderDynamicLightmaps (msurface_t *fa)
 
void Surf_RenderAmbientLightmaps (msurface_t *fa, int ambient)
 
void Surf_SetupFrame (void)
 
void Surf_GenBrushBatches (batch_t **batches, entity_t *ent)
 
void R_GeneratedWorldEBO (void *ctx, void *data, size_t a_, size_t b_)
 
void R_GenWorldEBO (void *ctx, void *data, size_t a, size_t b)
 
void Surf_DrawWorld (void)
 
unsigned int Surf_CalcMemSize (msurface_t *surf)
 
void Surf_DeInit (void)
 
void Surf_Clear (model_t *mod)
 
uploadfmt_t Surf_NameToFormat (const char *nam)
 
uploadfmt_t Surf_LightmapMode (model_t *model)
 
int Surf_NewLightmaps (int count, int width, int height, uploadfmt_t fmt, qboolean deluxe)
 
int Surf_NewExternalLightmaps (int count, char *filepattern, qboolean deluxe)
 
void Surf_BuildModelLightmaps (model_t *m)
 
void Surf_ClearSceneCache (void)
 
void Surf_BuildLightmaps (void)
 
void Surf_NewMap (model_t *worldmodel)
 
void Surf_PreNewMap (void)
 
void R_ObliqueNearClip (float *viewmat, mplane_t *wplane)
 

Variables

int webo_blocklightmapupdates
 
qboolean r_pushdepth
 
cvar_t r_ambient
 
model_tcurrentmodel
 
lightmapinfo_t ** lightmap
 
int numlightmaps
 
const float rgb9e5tab [32]
 
cvar_t r_stains
 
cvar_t r_loadlits = CVARFD("r_loadlit", "1", CVAR_ARCHIVE, "Whether to load lit files.")
 
cvar_t r_stainfadetime
 
cvar_t r_stainfadeammount
 
cvar_t r_lightmap_nearest
 
cvar_t r_lightmap_format
 
double r_loaderstalltime
 
int r_dlightframecount
 
cvar_t r_temporalscenecache = CVARAFD ("r_temporalscenecache", "", "r_scenecache", CVAR_ARCHIVE, "Controls whether to generate+reuse a scene cache over multiple frames. This is generated on a separate thread to avoid any associated costs. This can significantly boost framerates on complex maps, but can also stress the gpu more (performance tradeoff that varies per map). An outdated cache may be used if the cache takes too long to build (eg: lightmap animations), which could cause the odd glitch when moving fast (but retain more consistent framerates - another tradeoff).\n0: Tranditional quake rendering.\n1: Generate+Use the scene cache.")
 

Function Documentation

◆ R_GeneratedWorldEBO()

void R_GeneratedWorldEBO ( void ctx,
void data,
size_t  a_,
size_t  b_ 
)

◆ R_GenWorldEBO()

void R_GenWorldEBO ( void ctx,
void data,
size_t  a,
size_t  b 
)

◆ R_ObliqueNearClip()

void R_ObliqueNearClip ( float *  viewmat,
mplane_t wplane 
)

◆ Surf_AddStain()

void Surf_AddStain ( vec3_t  org,
float  red,
float  green,
float  blue,
float  radius 
)

◆ Surf_BuildLightmaps()

void Surf_BuildLightmaps ( void  )

◆ Surf_BuildModelLightmaps()

void Surf_BuildModelLightmaps ( model_t m)

◆ Surf_CalcMemSize()

unsigned int Surf_CalcMemSize ( msurface_t surf)

◆ Surf_Clear()

void Surf_Clear ( model_t mod)

◆ Surf_ClearSceneCache()

void Surf_ClearSceneCache ( void  )

◆ Surf_DeInit()

void Surf_DeInit ( void  )

◆ Surf_DrawWorld()

void Surf_DrawWorld ( void  )

◆ Surf_GenBrushBatches()

void Surf_GenBrushBatches ( batch_t **  batches,
entity_t ent 
)

◆ Surf_LessenStains()

void Surf_LessenStains ( void  )

◆ Surf_LightmapMode()

uploadfmt_t Surf_LightmapMode ( model_t model)

◆ Surf_LightmapShift()

int Surf_LightmapShift ( model_t model)

◆ Surf_NameToFormat()

uploadfmt_t Surf_NameToFormat ( const char *  nam)

◆ Surf_NewExternalLightmaps()

int Surf_NewExternalLightmaps ( int  count,
char *  filepattern,
qboolean  deluxe 
)

◆ Surf_NewLightmaps()

int Surf_NewLightmaps ( int  count,
int  width,
int  height,
uploadfmt_t  fmt,
qboolean  deluxe 
)

◆ Surf_NewMap()

void Surf_NewMap ( model_t worldmodel)

◆ Surf_PreNewMap()

void Surf_PreNewMap ( void  )

◆ Surf_RebuildLightmap_Callback()

void QDECL Surf_RebuildLightmap_Callback ( struct cvar_s var,
char *  oldvalue 
)

◆ Surf_RenderAmbientLightmaps()

void Surf_RenderAmbientLightmaps ( msurface_t fa,
int  ambient 
)

◆ Surf_RenderDynamicLightmaps()

void Surf_RenderDynamicLightmaps ( msurface_t fa)

◆ Surf_SetupFrame()

void Surf_SetupFrame ( void  )

◆ Surf_StainSurf()

void Surf_StainSurf ( model_t mod,
msurface_t surf,
float *  parms 
)

◆ Surf_WipeStains()

void Surf_WipeStains ( void  )

Variable Documentation

◆ currentmodel

model_t* currentmodel

◆ lightmap

lightmapinfo_t** lightmap

◆ numlightmaps

int numlightmaps

◆ r_ambient

cvar_t r_ambient
extern

◆ r_dlightframecount

int r_dlightframecount
extern

◆ r_lightmap_format

cvar_t r_lightmap_format
extern

◆ r_lightmap_nearest

cvar_t r_lightmap_nearest
extern

◆ r_loaderstalltime

double r_loaderstalltime

◆ r_loadlits

cvar_t r_loadlits = CVARFD("r_loadlit", "1", CVAR_ARCHIVE, "Whether to load lit files.")
extern

◆ r_pushdepth

qboolean r_pushdepth

◆ r_stainfadeammount

cvar_t r_stainfadeammount
extern

◆ r_stainfadetime

cvar_t r_stainfadetime
extern

◆ r_stains

cvar_t r_stains
extern

◆ r_temporalscenecache

cvar_t r_temporalscenecache = CVARAFD ("r_temporalscenecache", "", "r_scenecache", CVAR_ARCHIVE, "Controls whether to generate+reuse a scene cache over multiple frames. This is generated on a separate thread to avoid any associated costs. This can significantly boost framerates on complex maps, but can also stress the gpu more (performance tradeoff that varies per map). An outdated cache may be used if the cache takes too long to build (eg: lightmap animations), which could cause the odd glitch when moving fast (but retain more consistent framerates - another tradeoff).\n0: Tranditional quake rendering.\n1: Generate+Use the scene cache.")

◆ rgb9e5tab

const float rgb9e5tab[32]
extern

◆ webo_blocklightmapupdates

int webo_blocklightmapupdates