lightmap definitions More...
#include "r_entity.h"
Go to the source code of this file.
Data Structures | |
struct | lightmaps_s |
Defines | |
#define | LIGHTMAP_BLOCK_WIDTH 4096 |
#define | LIGHTMAP_BLOCK_HEIGHT 4096 |
#define | LIGHTMAP_BLOCK_BYTES 3 |
#define | DELUXEMAP_BLOCK_BYTES 3 |
#define | LIGHTMAP_BYTES 3 |
#define | LIGHTMAP_FBUFFER_SIZE (MAX_MAP_LIGHTMAP * LIGHTMAP_BYTES) |
Typedefs | |
typedef struct lightmaps_s | lightmaps_t |
Functions | |
void | R_BlendLightmaps (const model_t *mod) |
void | R_CreateSurfaceLightmap (mBspSurface_t *surf) |
void | R_EndBuildingLightmaps (void) |
void | R_BeginBuildingLightmaps (void) |
void | R_Trace (vec3_t start, vec3_t end, float size, int contentmask) |
Moves the given mins/maxs volume through the world from start to end. | |
Variables | |
lightmaps_t | r_lightmaps |
lightmap definitions
Definition in file r_lightmap.h.
#define DELUXEMAP_BLOCK_BYTES 3 |
Definition at line 34 of file r_lightmap.h.
Referenced by R_BuildDefaultLightmap(), R_BuildLightmap(), and R_CreateSurfaceLightmap().
#define LIGHTMAP_BLOCK_BYTES 3 |
Definition at line 33 of file r_lightmap.h.
Referenced by R_BuildDefaultLightmap(), R_BuildLightmap(), and R_CreateSurfaceLightmap().
#define LIGHTMAP_BLOCK_HEIGHT 4096 |
Definition at line 32 of file r_lightmap.h.
#define LIGHTMAP_BLOCK_WIDTH 4096 |
Definition at line 31 of file r_lightmap.h.
Referenced by R_CvarCheckMaxLightmap().
#define LIGHTMAP_BYTES 3 |
Definition at line 36 of file r_lightmap.h.
Referenced by R_BuildLightmap().
#define LIGHTMAP_FBUFFER_SIZE (MAX_MAP_LIGHTMAP * LIGHTMAP_BYTES) |
in the bsp, they are just rgb, and we work with floats
Definition at line 46 of file r_lightmap.h.
typedef struct lightmaps_s lightmaps_t |
void R_BeginBuildingLightmaps | ( | void | ) |
Definition at line 272 of file r_lightmap.c.
References lightmaps_s::allocated, byte, lightmaps_s::deluxemap_texnum, lightmaps_s::direction_buffer, cvar_s::integer, lightmaps_s::lightmap_texnum, Mem_PoolAlloc, r_maxlightmap, lightmaps_s::sample_buffer, lightmaps_s::size, TEXNUM_DELUXEMAPS, TEXNUM_LIGHTMAPS, and vid_lightPool.
Referenced by R_ModBeginLoading().
void R_BlendLightmaps | ( | const model_t * | mod | ) |
void R_CreateSurfaceLightmap | ( | mBspSurface_t * | surf | ) |
Definition at line 234 of file r_lightmap.c.
References byte, Com_Error(), DELUXEMAP_BLOCK_BYTES, lightmaps_s::deluxemap_texnum, mBspSurface_s::deluxemap_texnum, lightmaps_s::direction_buffer, ERR_DROP, mBspSurface_s::flags, mBspSurface_s::light_s, mBspSurface_s::light_t, LIGHTMAP_BLOCK_BYTES, mBspSurface_s::lightmap_scale, lightmaps_s::lightmap_texnum, mBspSurface_s::lightmap_texnum, MSURF_LIGHTMAP, R_AllocLightmapBlock(), R_BuildDefaultLightmap(), R_BuildLightmap(), R_UploadLightmapBlock(), lightmaps_s::sample_buffer, mBspSurface_s::samples, lightmaps_s::size, and mBspSurface_s::stextents.
Referenced by R_ModLoadSurfaces().
void R_EndBuildingLightmaps | ( | void | ) |
Definition at line 294 of file r_lightmap.c.
References R_UploadLightmapBlock().
Referenced by R_ModEndLoading().
Moves the given mins/maxs volume through the world from start to end.
[in] | start | Start vector to start the trace from |
[in] | end | End vector to stop the trace at |
[in] | size | Bounding box size used for tracing |
[in] | contentmask | Searched content the trace should watch for |
Definition at line 308 of file r_lightmap.c.
References model_s::bsp, CM_CompleteBoxTrace(), CM_TransformedBoxTrace, mBspModel_s::firstnode, trace_s::fraction, i, m, trace_s::mapTile, mBspModel_s::maptile, mapTiles_t::mapTiles, rendererData_t::mapTiles, mod_bsp_submodel, rendererData_t::numEntities, entity_t::origin, R_GetEntity(), r_locals, r_numMapTiles, refdef, rendererData_t::trace, rendererData_t::traceEntity, rlocals_s::tracenum, TRACING_ALL_VISIBLE_LEVELS, model_s::type, and VectorSet.
Referenced by R_DrawFlareSurfaces().
Definition at line 32 of file r_lightmap.c.
Referenced by R_LoadBspVertexArrays().