|
UFO: Alien Invasion
|

Go to the source code of this file.
Functions | |
| static void | R_UploadLightmapPage (void) |
| static bool | R_AllocLightmapBlock (int w, int h, int *x, int *y) |
| returns a texture number and the position inside it More... | |
| static void | R_BuildDefaultLightmap (mBspSurface_t *surf, byte *sout, byte *dout, int stride) |
| Fullbridght lightmap. More... | |
| static void | R_BuildLightmap (mBspSurface_t *surf, byte *sout, byte *dout, int stride) |
| Consume raw lightmap and deluxemap RGB/XYZ data from the surface samples, and write them into the strided block in the atlas page. More... | |
| void | R_CreateSurfaceLightmap (mBspSurface_t *surf) |
| static void | R_DisposeLightmaps (void) |
| void | R_BeginBuildingLightmaps (void) |
| void | R_EndBuildingLightmaps (void) |
| void | R_Trace (const Line &trLine, float size, int contentmask) |
| Moves the given mins/maxs volume through the world from start to end. More... | |
Variables | |
| lightmaps_t | r_lightmaps |
In video memory, lightmaps are chunked into NxN RGB pages. In the bsp, they are just sequentially stored RGB blocks per surface
Definition in file r_lightmap.cpp.
returns a texture number and the position inside it
Find a suitable location to store data in the texture atlas
Definition at line 96 of file r_lightmap.cpp.
References lightmaps_t::allocated, lightmaps_t::deluxemap_count, lightmaps_t::deluxemap_texnums, glGenTextures(), i, lightmaps_t::incomplete_atlas, lightmaps_t::lightmap_count, lightmaps_t::lightmap_texnums, r_lightmaps, and lightmaps_t::size.
Referenced by R_CreateSurfaceLightmap().
Definition at line 273 of file r_lightmap.cpp.
References lightmaps_t::allocated, lightmaps_t::deluxemap_count, DELUXEMAP_SAMPLE_SIZE, lightmaps_t::direction_buffer, lightmaps_t::incomplete_atlas, cvar_t::integer, lightmaps_t::lightmap_count, LIGHTMAP_SAMPLE_SIZE, Mem_PoolAllocTypeN, R_DisposeLightmaps(), r_lightmaps, r_maxlightmap, lightmaps_t::sample_buffer, lightmaps_t::size, and vid_lightPool.
Referenced by R_ModBeginLoading(), and R_ReinitOpenglContext().
|
static |
Fullbridght lightmap.
Definition at line 138 of file r_lightmap.cpp.
References DELUXEMAP_SAMPLE_SIZE, mBspSurface_t::lightColor, mBspSurface_t::lightmap, LIGHTMAP_SAMPLE_SIZE, mBspSurface_t::lightmap_scale, Mem_PoolAllocTypeN, mBspSurface_t::stextents, stride, Vector4Set, and vid_lightPool.
Referenced by R_CreateSurfaceLightmap().
|
static |
Consume raw lightmap and deluxemap RGB/XYZ data from the surface samples, and write them into the strided block in the atlas page.
Definition at line 174 of file r_lightmap.cpp.
References DELUXEMAP_SAMPLE_SIZE, mBspTexInfo_t::flags, mBspSurface_t::lightColor, mBspSurface_t::lightmap, LIGHTMAP_SAMPLE_SIZE, mBspSurface_t::lightmap_scale, Mem_PoolAllocTypeN, mBspSurface_t::samples, mBspSurface_t::stextents, stride, SURF_ALPHATEST, SURF_BLEND33, SURF_BLEND66, mBspSurface_t::texinfo, and vid_lightPool.
Referenced by R_CreateSurfaceLightmap().
| void R_CreateSurfaceLightmap | ( | mBspSurface_t * | surf | ) |
Definition at line 223 of file r_lightmap.cpp.
References Com_Error(), lightmaps_t::deluxemap_count, DELUXEMAP_SAMPLE_SIZE, mBspSurface_t::deluxemap_texnum, lightmaps_t::deluxemap_texnums, lightmaps_t::direction_buffer, ERR_DROP, mBspSurface_t::flags, mBspSurface_t::light_s, mBspSurface_t::light_t, lightmaps_t::lightmap_count, LIGHTMAP_SAMPLE_SIZE, mBspSurface_t::lightmap_scale, mBspSurface_t::lightmap_texnum, lightmaps_t::lightmap_texnums, MSURF_LIGHTMAP, R_AllocLightmapBlock(), R_BuildDefaultLightmap(), R_BuildLightmap(), r_lightmaps, R_UploadLightmapPage(), lightmaps_t::sample_buffer, mBspSurface_t::samples, lightmaps_t::size, and mBspSurface_t::stextents.
Referenced by R_ModLoadSurfaces(), and R_ReinitOpenglContext().
Definition at line 257 of file r_lightmap.cpp.
References lightmaps_t::deluxemap_count, lightmaps_t::deluxemap_texnums, lightmaps_t::lightmap_count, lightmaps_t::lightmap_texnums, and r_lightmaps.
Referenced by R_BeginBuildingLightmaps().
Definition at line 298 of file r_lightmap.cpp.
References lightmaps_t::allocated, lightmaps_t::direction_buffer, Mem_Free, r_lightmaps, R_UploadLightmapPage(), and lightmaps_t::sample_buffer.
Referenced by R_ModEndLoading(), and R_ReinitOpenglContext().
Moves the given mins/maxs volume through the world from start to end.
| [in] | trLine | Start and end vectors of the trace |
| [in] | size | Bounding box size used for tracing |
| [in] | contentmask | Searched content the trace should watch for |
Definition at line 317 of file r_lightmap.cpp.
References entity_t::angles, CM_CompleteBoxTrace(), CM_TransformedBoxTrace, AABB::expand(), trace_t::fraction, i, m, trace_t::mapTile, rendererData_t::mapTiles, mapTiles_t::mapTiles, mod_bsp_submodel, entity_t::model, rendererData_t::numEntities, entity_t::origin, R_GetEntity(), r_locals, r_numMapTiles, refdef, tr, rendererData_t::trace, TRACE_ALL_LEVELS, rendererData_t::traceEntity, and rlocals_t::tracenum.
Referenced by R_DrawFlareSurfaces(), R_UpdateLightList(), and R_UpdateShadowOrigin().
Definition at line 34 of file r_lightmap.cpp.
References lightmaps_t::allocated, Com_Printf(), lightmaps_t::deluxemap_count, DELUXEMAP_SAMPLE_SIZE, lightmaps_t::deluxemap_texnums, lightmaps_t::direction_buffer, rconfig_t::gl_compressed_solid_format, rconfig_t::gl_solid_format, glGenTextures(), glTexImage2D(), glTexParameterf(), GLuint, lightmaps_t::incomplete_atlas, lightmaps_t::lightmap_count, LIGHTMAP_SAMPLE_SIZE, lightmaps_t::lightmap_texnums, MAX_GL_DELUXEMAPS, MAX_GL_LIGHTMAPS, R_BindTexture, R_CheckError, r_config, r_lightmaps, lightmaps_t::sample_buffer, and lightmaps_t::size.
Referenced by R_CreateSurfaceLightmap(), and R_EndBuildingLightmaps().
| lightmaps_t r_lightmaps |
Definition at line 32 of file r_lightmap.cpp.
Referenced by R_AllocLightmapBlock(), R_BeginBuildingLightmaps(), R_CreateSurfaceLightmap(), R_DisposeLightmaps(), R_EndBuildingLightmaps(), R_LoadBspVertexArrays(), and R_UploadLightmapPage().