![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Data Structures | |
struct | lightmaplight_t |
struct | lightmapsample_t |
struct | lightmaptriangle_t |
struct | lightmapvertex_t |
struct | Mod_MakeSortedSurfaces_qsortsurface_t |
struct | q3shader_data_t |
struct | q3shader_hash_entry_t |
Macros | |
#define | LM_DIST_EPSILON (1.0f / 32.0f) |
#define | MAX_LIGHTMAPSAMPLES 64 |
#define | Q3SHADER_HASH_SIZE 1021 |
Typedefs | |
typedef void(* | mod_framegroupify_parsegroups_t) (unsigned int i, int start, int len, float fps, qbool loop, const char *name, void *pass) |
Variables | |
float | lmaxis [3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} |
static modloader_t | loader [] |
model_t * | loadmodel |
unsigned char * | mod_base |
cvar_t | mod_generatelightmaps_borderpixels = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_borderpixels", "2", "extra space around polygons to prevent sampling artifacts"} |
cvar_t | mod_generatelightmaps_gridradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_gridradius", "64", "sampling area around each lightgrid cell center"} |
cvar_t | mod_generatelightmaps_gridsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_gridsamples", "64", "number of shadow tests done per lightgrid cell"} |
static lightmaplight_t * | mod_generatelightmaps_lightinfo |
cvar_t | mod_generatelightmaps_lightmapradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_lightmapradius", "16", "sampling area around each lightmap pixel"} |
cvar_t | mod_generatelightmaps_lightmapsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_lightmapsamples", "16", "number of shadow tests done per lightmap pixel"} |
lightmaptriangle_t * | mod_generatelightmaps_lightmaptriangles |
static int | mod_generatelightmaps_numlights |
static int | mod_generatelightmaps_numoffsets [3] |
static float | mod_generatelightmaps_offsets [3][MAX_LIGHTMAPSAMPLES][3] |
cvar_t | mod_generatelightmaps_texturesize = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_texturesize", "1024", "size of lightmap textures"} |
cvar_t | mod_generatelightmaps_unitspersample = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_unitspersample", "8", "lightmap resolution"} |
cvar_t | mod_generatelightmaps_vertexradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_vertexradius", "16", "sampling area around each vertex"} |
cvar_t | mod_generatelightmaps_vertexsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_vertexsamples", "16", "number of shadow tests done per vertex"} |
static mempool_t * | mod_mempool |
cvar_t | mod_obj_orientation |
cvar_t | mod_q3bsp_nolightmaps |
static memexpandablearray_t | models |
static q3shader_data_t * | q3shader_data |
static mempool_t * | q3shaders_mem |
cvar_t | r_mipnormalmaps = {CF_CLIENT | CF_ARCHIVE, "r_mipnormalmaps", "1", "mipmaps normalmaps (turning it off looks sharper but may have aliasing)"} |
cvar_t | r_mipskins = {CF_CLIENT | CF_ARCHIVE, "r_mipskins", "0", "mipmaps model skins so they render faster in the distance and do not display noise artifacts, can cause discoloration of skins if they contain undesirable border colors"} |
cvar_t | r_shadow_lightattenuationdividebias |
cvar_t | r_shadow_lightattenuationlinearscale |
qbool | vid_opened |
#define LM_DIST_EPSILON (1.0f / 32.0f) |
#define MAX_LIGHTMAPSAMPLES 64 |
Definition at line 3572 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets().
#define Q3SHADER_HASH_SIZE 1021 |
Definition at line 76 of file model_shared.c.
Referenced by Mod_LookupQ3Shader(), and Q3Shader_AddToHash().
typedef void(* mod_framegroupify_parsegroups_t) (unsigned int i, int start, int len, float fps, qbool loop, const char *name, void *pass) |
Definition at line 261 of file model_shared.c.
qbool Mod_AllocLightmap_Block | ( | mod_alloclightmap_state_t * | state, |
int | blockwidth, | ||
int | blockheight, | ||
int * | outx, | ||
int * | outy ) |
Definition at line 3482 of file model_shared.c.
References mod_alloclightmap_row_t::currentX, mod_alloclightmap_state_t::currentY, height, mod_alloclightmap_state_t::height, mod_alloclightmap_state_t::rows, mod_alloclightmap_row_t::rowY, mod_alloclightmap_state_t::width, width, and y.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), and R_Shadow_PrepareLights().
void Mod_AllocLightmap_Free | ( | mod_alloclightmap_state_t * | state | ) |
Definition at line 3475 of file model_shared.c.
References Mem_Free, and mod_alloclightmap_state_t::rows.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), and R_Shadow_FreeShadowMaps().
void Mod_AllocLightmap_Init | ( | mod_alloclightmap_state_t * | state, |
mempool_t * | mempool, | ||
int | width, | ||
int | height ) |
Definition at line 3449 of file model_shared.c.
References mod_alloclightmap_row_t::currentX, mod_alloclightmap_state_t::currentY, height, mod_alloclightmap_state_t::height, Mem_Alloc, mod_alloclightmap_state_t::rows, mod_alloclightmap_row_t::rowY, mod_alloclightmap_state_t::width, width, and y.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), and R_Shadow_SetShadowMode().
void Mod_AllocLightmap_Reset | ( | mod_alloclightmap_state_t * | state | ) |
Definition at line 3464 of file model_shared.c.
References mod_alloclightmap_row_t::currentX, mod_alloclightmap_state_t::currentY, mod_alloclightmap_state_t::height, mod_alloclightmap_state_t::rows, mod_alloclightmap_row_t::rowY, and y.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), and R_Shadow_PrepareLights().
void Mod_AllocSurfMesh | ( | mempool_t * | mempool, |
int | numvertices, | ||
int | numtriangles, | ||
qbool | lightmapoffsets, | ||
qbool | vertexcolors ) |
Definition at line 973 of file model_shared.c.
References data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_lightmapoffsets, surfmesh_t::data_normal3f, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordtexture2f, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, loadmodel, Mem_Alloc, surfmesh_t::num_triangles, surfmesh_t::num_vertices, and model_t::surfmesh.
Referenced by Mod_Q1BSP_LoadFaces(), Mod_Q3BSP_LoadFaces(), and Mod_VBSP_LoadFaces().
void Mod_BuildNormals | ( | int | firstvertex, |
int | numvertices, | ||
int | numtriangles, | ||
const float * | vertex3f, | ||
const int * | elements, | ||
float * | normal3f, | ||
qbool | areaweighting ) |
Definition at line 806 of file model_shared.c.
References i, TriangleNormal, and VectorNormalize.
Referenced by Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), Mod_ZYMOTICMODEL_Load(), RSurf_ActiveCustomEntity(), RSurf_PrepareVerticesForBatch(), and VM_CL_R_PolygonEnd().
void Mod_BuildTextureVectorsFromNormals | ( | int | firstvertex, |
int | numvertices, | ||
int | numtriangles, | ||
const float * | vertex3f, | ||
const float * | texcoord2f, | ||
const float * | normal3f, | ||
const int * | elements, | ||
float * | svector3f, | ||
float * | tvector3f, | ||
qbool | areaweighting ) |
Definition at line 893 of file model_shared.c.
References CrossProduct, DotProduct, f, i, n, normal, v0, v1, v2, VectorAdd, VectorMA, VectorNegate, VectorNormalize, and VectorSubtract.
Referenced by Mod_Alias_MorphMesh_CompileFrames(), Mod_DARKPLACESMODEL_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_Mesh_Finalize(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_LoadFaces(), Mod_Q3BSP_LoadFaces(), Mod_VBSP_LoadFaces(), Mod_ZYMOTICMODEL_Load(), RSurf_ActiveCustomEntity(), and RSurf_PrepareVerticesForBatch().
Definition at line 2964 of file model_shared.c.
References ca_dedicated, cls, Con_Printf(), CON_WARN, surfmesh_t::data_element3i, surfmesh_t::data_element3i_indexbuffer, surfmesh_t::data_element3s, surfmesh_t::data_element3s_indexbuffer, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_lightmapcolor4f_bufferoffset, surfmesh_t::data_lightmapcolor4f_vertexbuffer, surfmesh_t::data_normal3f, surfmesh_t::data_normal3f_bufferoffset, surfmesh_t::data_normal3f_vertexbuffer, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalindex4ub_bufferoffset, surfmesh_t::data_skeletalindex4ub_vertexbuffer, surfmesh_t::data_skeletalweight4ub, surfmesh_t::data_skeletalweight4ub_bufferoffset, surfmesh_t::data_skeletalweight4ub_vertexbuffer, surfmesh_t::data_svector3f, surfmesh_t::data_svector3f_bufferoffset, surfmesh_t::data_svector3f_vertexbuffer, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordlightmap2f_bufferoffset, surfmesh_t::data_texcoordlightmap2f_vertexbuffer, surfmesh_t::data_texcoordtexture2f, surfmesh_t::data_texcoordtexture2f_bufferoffset, surfmesh_t::data_texcoordtexture2f_vertexbuffer, surfmesh_t::data_tvector3f, surfmesh_t::data_tvector3f_bufferoffset, surfmesh_t::data_tvector3f_vertexbuffer, surfmesh_t::data_vertex3f, surfmesh_t::data_vertex3f_bufferoffset, surfmesh_t::data_vertex3f_vertexbuffer, gl_paranoid, i, cvar_t::integer, loadmodel, Mem_Alloc, Mem_Free, model_t::name, NULL, surfmesh_t::num_triangles, surfmesh_t::num_vertices, R_Mesh_CreateMeshBuffer(), size, client_static_t::state, model_t::surfmesh, and tempmempool.
Referenced by Mod_LoadModel(), Mod_OBJ_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), and Mod_Q3BSP_Load().
int Mod_BuildVertexRemapTableFromElements | ( | int | numelements, |
const int * | elements, | ||
int | numvertices, | ||
int * | remapvertices ) |
Definition at line 724 of file model_shared.c.
References count, i, Mem_Alloc, Mem_Free, and tempmempool.
Definition at line 564 of file model_shared.c.
References i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), and models.
Referenced by CL_ParseServerInfo(), QW_CL_RequestNextDownload(), and SV_SpawnServer().
int Mod_CountSkinFiles | ( | skinfile_t * | skinfile | ) |
Definition at line 1196 of file model_shared.c.
References mod(), Mod_ShadowMesh_AddMesh(), Mod_ShadowMesh_Begin(), Mod_ShadowMesh_Finish(), texture_t::name, NULL, msurface_t::num_firsttriangle, msurface_t::num_triangles, texture_t::supercontents, SUPERCONTENTS_SOLID, and msurface_t::texture.
texture_shaderpass_t * Mod_CreateShaderPass | ( | mempool_t * | mempool, |
skinframe_t * | skinframe ) |
Definition at line 2236 of file model_shared.c.
References q3shaderinfo_layer_alphagen_t::alphagen, texture_shaderpass_t::alphagen, texture_shaderpass_t::alphatest, texture_shaderpass_t::blendfunc, texture_shaderpass_t::framerate, GL_ONE, GL_ZERO, Mem_Alloc, texture_shaderpass_t::numframes, Q3ALPHAGEN_IDENTITY, Q3RGBGEN_IDENTITY, Q3TCGEN_TEXTURE, q3shaderinfo_layer_rgbgen_t::rgbgen, texture_shaderpass_t::rgbgen, texture_shaderpass_t::skinframes, q3shaderinfo_layer_tcgen_t::tcgen, and texture_shaderpass_t::tcgen.
Referenced by Mod_LoadCustomMaterial(), Mod_LoadTextureFromQ3Shader(), Mod_Q1BSP_LoadTextures(), and Mod_SpriteSetupTexture().
texture_shaderpass_t * Mod_CreateShaderPassFromQ3ShaderLayer | ( | mempool_t * | mempool, |
const char * | modelname, | ||
q3shaderinfo_layer_t * | layer, | ||
int | layerindex, | ||
int | texflags, | ||
const char * | texturename ) |
Definition at line 2251 of file model_shared.c.
References texture_shaderpass_t::alphagen, texture_shaderpass_t::alphatest, texture_shaderpass_t::blendfunc, texture_shaderpass_t::framerate, layer, Mem_Alloc, texture_shaderpass_t::numframes, Q3MAXTCMODS, Q3TCMOD_NONE, R_SkinFrame_LoadExternal(), texture_shaderpass_t::rgbgen, texture_shaderpass_t::skinframes, texture_shaderpass_t::tcgen, and texture_shaderpass_t::tcmods.
Referenced by Mod_LoadTextureFromQ3Shader().
|
static |
Definition at line 3318 of file model_shared.c.
References cl, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Print(), count, dp_strlcpy, dpsnprintf(), first, FS_StripExtension(), FS_WriteFile(), i, MAX_QPATH, mod(), Mod_Decompile_OBJ(), Mod_Decompile_SMD(), Mod_ForName(), client_state_t::model_name, NULL, strlen(), and va().
Referenced by Mod_Init().
|
static |
Definition at line 3033 of file model_shared.c.
References a, b, model_t::brush, Con_Printf(), dp_strlcpy, dpsnprintf(), FS_WriteFile(), cvar_t::integer, max, MAX_QPATH, mod_obj_orientation, model, texture_t::name, msurface_t::num_firsttriangle, msurface_t::num_triangles, msurface_t::num_vertices, model_brush_t::numsubmodels, model_t::submodelsurfaces_start, msurface_t::texture, v, Z_Free, and Z_Malloc.
Referenced by Mod_Decompile_f().
|
static |
Definition at line 3154 of file model_shared.c.
References a, angles, AnglesFromVectors(), b, Con_Printf(), cos(), DEG2RAD, dpsnprintf(), FS_WriteFile(), blendweights_t::index, index, Matrix4x4_FromBonePose7s(), Matrix4x4_ToArray12FloatGL(), model, texture_t::name, msurface_t::num_firsttriangle, PITCH, ROLL, sin(), msurface_t::texture, v, w, YAW, Z_Free, and Z_Malloc.
Referenced by Mod_Decompile_f().
model_t * Mod_FindName | ( | const char * | name, |
const char * | parentname ) |
Definition at line 595 of file model_shared.c.
References dp_strlcpy, Host_Error(), i, int(), Mem_ExpandableArray_AllocRecord(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), Mod_FindName(), models, name, and NULL.
Referenced by CL_ParseServerInfo(), Mod_FindName(), Mod_ForName(), Mod_OBJ_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), QW_CL_RequestNextDownload(), SV_ModelIndex(), and VM_CL_effect().
Definition at line 372 of file model_shared.c.
References i, mod(), Q3DEFORM_AUTOSPRITE, Q3DEFORM_NONE, Q3MAXDEFORMS, Q3TCGEN_ENVIRONMENT, and texture.
Referenced by Mod_LoadModel().
Definition at line 640 of file model_shared.c.
References CL_StartVideo(), crash(), Mod_FindName(), Mod_LoadModel(), model, name, and vid_opened.
Referenced by CL_BeginDownloads(), CL_ParseServerInfo(), CL_ParseServerMessage(), CL_ParseTempEntity(), Mod_Decompile_f(), Mod_Precache_f(), QW_CL_RequestNextDownload(), SV_Loadgame_f(), SV_ModelIndex(), SV_SpawnServer(), SV_Viewmodel_f(), and VM_CL_precache_model().
Definition at line 351 of file model_shared.c.
References buf, Con_Printf(), Mem_Alloc, mod(), Mod_FrameGroupify_ParseGroups(), Mod_FrameGroupify_ParseGroups_Store(), and NULL.
Referenced by Mod_LoadModel().
|
static |
Definition at line 263 of file model_shared.c.
References buf, COM_ParseToken_Simple(), com_token, Con_Printf(), dp_strlcpy, i, name, and NULL.
Referenced by Mod_FrameGroupify().
|
static |
Definition at line 336 of file model_shared.c.
References bound, dp_strlcpy, dpsnprintf(), animscene_t::firstframe, animscene_t::framecount, animscene_t::framerate, i, animscene_t::loop, max, mod(), animscene_t::name, and name.
Referenced by Mod_FrameGroupify().
Definition at line 1403 of file model_shared.c.
References Mem_FreePool, and q3shaders_mem.
Referenced by CL_BeginDownloads(), CL_SignonReply(), Mod_LoadQ3Shaders(), mod_shutdown(), and SV_SpawnServer().
void Mod_FreeSkinFiles | ( | skinfile_t * | skinfile | ) |
Definition at line 2810 of file model_shared.c.
References skinfile_t::items, Mem_Free, skinfile_t::next, and skinfileitem_t::next.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 4407 of file model_shared.c.
References cvar_t::integer, loadmodel, Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateLights(), Mod_GenerateLightmaps_CreateTriangleInformation(), Mod_GenerateLightmaps_DestroyLightmaps(), Mod_GenerateLightmaps_DestroyLights(), Mod_GenerateLightmaps_DestroyTriangleInformation(), Mod_GenerateLightmaps_InitSampleOffsets(), Mod_GenerateLightmaps_UnweldTriangles(), Mod_GenerateLightmaps_UpdateLightGrid(), Mod_GenerateLightmaps_UpdateVertexColors(), mod_q3bsp_nolightmaps, and model.
Referenced by Mod_GenerateLightmaps_f().
Definition at line 4123 of file model_shared.c.
References lightmaptriangle_t::axis, bound, Con_Printf(), CrossProduct, msurface_t::deluxemaptexture, floor(), forward, i, int(), cvar_t::integer, lightmaptriangle_t::lightmapindex, msurface_t::lightmapinfo, msurface_t::lightmaptexture, lmaxis, lightmaptriangle_t::lmbase, lightmaptriangle_t::lmoffset, lightmaptriangle_t::lmscale, lightmaptriangle_t::lmsize, loadmodel, Matrix4x4_FromVectors(), max, lightmaptriangle_t::maxs, viddef_t::maxtexturesize_2d, Mem_Alloc, Mem_Free, model_t::mempool, min, lightmaptriangle_t::mins, Mod_AllocLightmap_Block(), Mod_AllocLightmap_Free(), Mod_AllocLightmap_Init(), Mod_AllocLightmap_Reset(), mod_generatelightmaps_borderpixels, Mod_GenerateLightmaps_LightmapSample(), mod_generatelightmaps_lightmaptriangles, Mod_GenerateLightmaps_LightPoint(), mod_generatelightmaps_texturesize, mod_generatelightmaps_unitspersample, model, NULL, msurface_t::num_firsttriangle, msurface_t::num_triangles, origin, R_AllocTexturePool(), R_LoadTexture2D(), tempmempool, TEXF_FORCELINEAR, TEXTYPE_BGRA, TriangleNormal, up, va(), cvar_t::value, VectorCopy, VectorMA, VectorNegate, VectorNormalize, lightmaptriangle_t::vertex, vid, x, and y.
Referenced by Mod_GenerateLightmaps().
Definition at line 3716 of file model_shared.c.
References color, lightmaplight_t::color, index, lightmaplight_t::iradius, Mem_Alloc, Mod_GenerateLightmaps_CreateLights_ComputeSVBSP(), mod_generatelightmaps_lightinfo, mod_generatelightmaps_numlights, model, lightmaplight_t::origin, origin, R_Shadow_GetRTLightInfo(), lightmaplight_t::radius, lightmaplight_t::radius2, and tempmempool.
Referenced by Mod_GenerateLightmaps().
|
static |
Definition at line 3677 of file model_shared.c.
References maxs, Mem_Alloc, Mem_Free, mins, Mod_GenerateLightmaps_CreateLights_ComputeSVBSP_InsertSurfaces(), model, svbsp_t::nodes, svbsp_t::numnodes, lightmaplight_t::origin, origin, lightmaplight_t::radius, svbsp_t::ranoutofnodes, lightmaplight_t::svbsp, SVBSP_Init(), tempmempool, VectorCopy, and VectorSet.
Referenced by Mod_GenerateLightmaps_CreateLights().
|
static |
Definition at line 3651 of file model_shared.c.
References texture_t::basematerialflags, BoxesOverlap, MATERIALFLAG_NOSHADOW, maxs, msurface_t::maxs, mins, msurface_t::mins, model, NULL, msurface_t::num_firsttriangle, SVBSP_AddPolygon(), msurface_t::texture, v2, and VectorCopy.
Referenced by Mod_GenerateLightmaps_CreateLights_ComputeSVBSP().
Definition at line 4072 of file model_shared.c.
References lightmaptriangle_t::axis, fabs(), i, max, lightmaptriangle_t::maxs, Mem_Alloc, min, lightmaptriangle_t::mins, mod_generatelightmaps_lightmaptriangles, model, normal, msurface_t::num_firsttriangle, msurface_t::num_triangles, lightmaptriangle_t::surfaceindex, lightmaptriangle_t::triangleindex, TriangleNormal, VectorCopy, and lightmaptriangle_t::vertex.
Referenced by Mod_GenerateLightmaps().
Definition at line 3940 of file model_shared.c.
References msurface_t::deluxemaptexture, i, msurface_t::lightmaptexture, Mem_Free, model, NULL, and R_FreeTexture().
Referenced by Mod_GenerateLightmaps().
Definition at line 3755 of file model_shared.c.
References i, Mem_Free, mod_generatelightmaps_lightinfo, mod_generatelightmaps_numlights, and NULL.
Referenced by Mod_GenerateLightmaps().
Definition at line 4114 of file model_shared.c.
References Mem_Free, mod_generatelightmaps_lightmaptriangles, and NULL.
Referenced by Mod_GenerateLightmaps().
|
static |
Definition at line 4428 of file model_shared.c.
References cl, cmd(), Cmd_Argc(), Con_Printf(), Mod_GenerateLightmaps(), and client_state_t::worldmodel.
Referenced by Mod_Init().
|
static |
Definition at line 3888 of file model_shared.c.
References q3dlightgrid_t::ambientrgb, bound, q3dlightgrid_t::diffusepitch, q3dlightgrid_t::diffusergb, q3dlightgrid_t::diffuseyaw, dir, M_PI, mod_generatelightmaps_numoffsets, mod_generatelightmaps_offsets, Mod_GenerateLightmaps_SamplePoint(), NULL, VectorCopy, VectorMA, VectorNormalize, and VectorScale.
Referenced by Mod_GenerateLightmaps_UpdateLightGrid().
Definition at line 3918 of file model_shared.c.
References i, cvar_t::integer, MAX_LIGHTMAPSAMPLES, min, mod_generatelightmaps_gridradius, mod_generatelightmaps_gridsamples, mod_generatelightmaps_lightmapradius, mod_generatelightmaps_lightmapsamples, mod_generatelightmaps_numoffsets, mod_generatelightmaps_offsets, mod_generatelightmaps_vertexradius, mod_generatelightmaps_vertexsamples, cvar_t::value, VectorRandom, and VectorScale.
Referenced by Mod_GenerateLightmaps().
|
static |
Definition at line 3854 of file model_shared.c.
References bound, color, dir, DotProduct, f, max, mod_generatelightmaps_numoffsets, mod_generatelightmaps_offsets, Mod_GenerateLightmaps_SamplePoint(), normal, VectorCopy, VectorNormalize, VectorScale, and VectorSet.
Referenced by Mod_GenerateLightmaps_CreateLightmaps().
|
static |
Definition at line 3582 of file model_shared.c.
References color, dir, trace_t::fraction, i, index, intensity, MATERIALFLAG_NOSHADOW, MATERIALFLAGMASK_TRANSLUCENT, model, NULL, R_Shadow_GetRTLightInfo(), r_shadow_lightattenuationdividebias, r_shadow_lightattenuationlinearscale, sqrt(), SUPERCONTENTS_SOLID, cvar_t::value, VectorCopy, VectorLength, VectorLength2, VectorMA, VectorNormalize, VectorScale, and VectorSubtract.
Referenced by Mod_GenerateLightmaps_CreateLightmaps().
|
static |
Definition at line 3782 of file model_shared.c.
References cl, color, lightmaplight_t::color, DotProduct, float, trace_t::fraction, i, intensity, lightmaplight_t::iradius, MATERIALFLAG_NOSHADOW, MATERIALFLAGMASK_TRANSLUCENT, mod_generatelightmaps_lightinfo, mod_generatelightmaps_numlights, Mod_GenerateLightmaps_SamplePoint_SVBSP(), normal, NULL, offsets, lightmaplight_t::origin, r_shadow_lightattenuationdividebias, r_shadow_lightattenuationlinearscale, lightmaplight_t::radius2, sqrt(), SUPERCONTENTS_SOLID, lightmaplight_t::svbsp, cvar_t::value, VectorAdd, VectorLength, VectorLength2, VectorLerp, VectorMA, VectorNormalize, VectorScale, VectorSubtract, and client_state_t::worldmodel.
Referenced by Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_LightmapSample(), and Mod_GenerateLightmaps_VertexSample().
|
static |
Definition at line 3769 of file model_shared.c.
References svbsp_node_t::children, DotProduct, svbsp_t::nodes, and svbsp_node_t::plane.
Referenced by Mod_GenerateLightmaps_SamplePoint().
Definition at line 3969 of file model_shared.c.
References data, surfmesh_t::data_element3i, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_normal3f, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordtexture2f, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, i, Mem_Alloc, model, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, R_Mesh_DestroyMeshBuffer(), size, and Vector4Set.
Referenced by Mod_GenerateLightmaps().
Definition at line 4384 of file model_shared.c.
References index, Mod_GenerateLightmaps_GridSample(), model, x, y, and z.
Referenced by Mod_GenerateLightmaps().
Definition at line 4377 of file model_shared.c.
References i, Mod_GenerateLightmaps_VertexSample(), and model.
Referenced by Mod_GenerateLightmaps().
|
static |
Definition at line 3881 of file model_shared.c.
References mod_generatelightmaps_numoffsets, mod_generatelightmaps_offsets, Mod_GenerateLightmaps_SamplePoint(), normal, and VectorCopy.
Referenced by Mod_GenerateLightmaps_UpdateVertexColors().
Definition at line 178 of file model_shared.c.
References CF_CLIENT, Cmd_AddCommand(), Cvar_RegisterVariable(), Mem_AllocPool, Mem_ExpandableArray_NewArray(), Mod_AliasInit(), Mod_BrushInit(), Mod_Decompile_f(), mod_generatelightmaps_borderpixels, Mod_GenerateLightmaps_f(), mod_generatelightmaps_gridradius, mod_generatelightmaps_gridsamples, mod_generatelightmaps_lightmapradius, mod_generatelightmaps_lightmapsamples, mod_generatelightmaps_texturesize, mod_generatelightmaps_unitspersample, mod_generatelightmaps_vertexradius, mod_generatelightmaps_vertexsamples, mod_mempool, Mod_Precache_f(), Mod_Print_f(), Mod_SpriteInit(), models, NULL, r_mipnormalmaps, and r_mipskins.
Referenced by Host_Init().
void Mod_LoadCustomMaterial | ( | mempool_t * | mempool, |
texture_t * | texture, | ||
const char * | name, | ||
int | supercontents, | ||
int | materialflags, | ||
skinframe_t * | skinframe ) |
Definition at line 2653 of file model_shared.c.
References Con_DPrintf(), developer_extra, dp_strlcpy, cvar_t::integer, MATERIALFLAG_SKY, MATERIALFLAG_WALL, Mod_CreateShaderPass(), mod_noshader_default_offsetmapping, name, NULL, OFFSETMAPPING_DEFAULT, OFFSETMAPPING_OFF, texture, TRANSPARENTSORT_DISTANCE, and cvar_t::value.
Referenced by CL_Beams_SetupBuiltinTexture(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_IDP0_Load(), and Mod_IDP2_Load().
Definition at line 406 of file model_shared.c.
References buf, Con_DPrintf(), CON_ERROR, Con_Printf(), crash(), CRC_Block(), developer_loading, FS_FileExtension(), FS_LoadFile(), i, int(), cvar_t::integer, modloader_t::Load, loader, loadmodel, Mem_AllocPool, Mem_Free, mod(), Mod_BuildVBOs(), Mod_FindPotentialDeforms(), Mod_FrameGroupify(), Mod_LoadQ3Shaders(), mod_null, Mod_SetDrawSkyAndWater(), Mod_UnloadModel(), NULL, q3shaders_mem, R_Model_Null_Draw(), SCR_PopLoadingScreen(), SCR_PushLoadingScreen(), tempmempool, va(), VectorClear, and VectorSet.
Referenced by Mod_ForName(), Mod_Reload(), and mod_start().
Definition at line 1466 of file model_shared.c.
References shader_t::biaspolygonfactor, shader_t::biaspolygonoffset, q3shader_data_t::char_ptrs, COM_ParseToken_QuakeC(), com_token, Con_DPrint(), Con_DPrintf(), Con_Printf(), Cvar_VariableValue(), cvars_all, q3shaderinfo_deform_t::deform, shader_t::deforms, developer_insane, dp_strlcpy, shader_t::dpmeshcollisions, shader_t::dpnortlight, shader_t::dpnoshadow, shader_t::dpreflectcube, shader_t::dpshaderkill, shader_t::dpshadow, dpsnprintf(), q3shaderinfo_layer_t::dptexflags, f, fssearch_t::filenames, FS_FreeSearch(), FS_LoadFile(), FS_Search(), GL_DST_ALPHA, GL_DST_COLOR, GL_ONE, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA, GL_SRC_COLOR, GL_ZERO, q3shader_data_t::hash_entries, i, int(), cvar_t::integer, layer, shader_t::layers, shader_t::lighting, Mem_Alloc, Mem_AllocPool, Mem_ExpandableArray_AllocRecord(), Mem_ExpandableArray_NewArray(), Mem_Free, Mem_strdup, min, Mod_FreeQ3Shaders(), Mod_LoadQ3Shaders_EnumerateWaveFunc(), mod_q3shader_default_offsetmapping, mod_q3shader_default_offsetmapping_bias, mod_q3shader_default_offsetmapping_scale, mod_q3shader_default_polygonfactor, mod_q3shader_default_polygonoffset, mod_q3shader_force_addalpha, mod_q3shader_force_terrain_alphaflag, shader_t::name, NULL, fssearch_t::numfilenames, shader_t::numlayers, shader_t::offsetbias, shader_t::offsetmapping, OFFSETMAPPING_DEFAULT, OFFSETMAPPING_LINEAR, OFFSETMAPPING_OFF, OFFSETMAPPING_RELIEF, shader_t::offsetscale, q3shaderinfo_deform_t::parms, Q3ALPHAGEN_CONST, Q3ALPHAGEN_ENTITY, Q3ALPHAGEN_IDENTITY, Q3ALPHAGEN_LIGHTINGSPECULAR, Q3ALPHAGEN_MAXPARMS, Q3ALPHAGEN_ONEMINUSENTITY, Q3ALPHAGEN_ONEMINUSVERTEX, Q3ALPHAGEN_PORTAL, Q3ALPHAGEN_VERTEX, Q3ALPHAGEN_WAVE, Q3DEFORM_AUTOSPRITE, Q3DEFORM_AUTOSPRITE2, Q3DEFORM_BULGE, Q3DEFORM_MAXPARMS, Q3DEFORM_MOVE, Q3DEFORM_NONE, Q3DEFORM_NORMAL, Q3DEFORM_PROJECTIONSHADOW, Q3DEFORM_TEXT0, Q3DEFORM_TEXT1, Q3DEFORM_TEXT2, Q3DEFORM_TEXT3, Q3DEFORM_TEXT4, Q3DEFORM_TEXT5, Q3DEFORM_TEXT6, Q3DEFORM_TEXT7, Q3DEFORM_WAVE, Q3MAXDEFORMS, Q3MAXTCMODS, Q3PATHLENGTH, Q3RGBGEN_CONST, Q3RGBGEN_ENTITY, Q3RGBGEN_EXACTVERTEX, Q3RGBGEN_IDENTITY, Q3RGBGEN_IDENTITYLIGHTING, Q3RGBGEN_LIGHTINGDIFFUSE, Q3RGBGEN_MAXPARMS, Q3RGBGEN_ONEMINUSENTITY, Q3RGBGEN_ONEMINUSVERTEX, Q3RGBGEN_VERTEX, Q3RGBGEN_WAVE, Q3Shader_AddToHash(), q3shader_data, Q3SHADER_MAXLAYERS, q3shaders_mem, Q3SURFACEPARM_ALPHASHADOW, Q3SURFACEPARM_ANTIPORTAL, Q3SURFACEPARM_AREAPORTAL, Q3SURFACEPARM_BOTCLIP, Q3SURFACEPARM_CLUSTERPORTAL, Q3SURFACEPARM_DETAIL, Q3SURFACEPARM_DONOTENTER, Q3SURFACEPARM_DUST, Q3SURFACEPARM_FOG, Q3SURFACEPARM_HINT, Q3SURFACEPARM_LAVA, Q3SURFACEPARM_LIGHTFILTER, Q3SURFACEPARM_LIGHTGRID, Q3SURFACEPARM_METALSTEPS, Q3SURFACEPARM_NODAMAGE, Q3SURFACEPARM_NODLIGHT, Q3SURFACEPARM_NODRAW, Q3SURFACEPARM_NODROP, Q3SURFACEPARM_NOIMPACT, Q3SURFACEPARM_NOLIGHTMAP, Q3SURFACEPARM_NOMARKS, Q3SURFACEPARM_NOMIPMAPS, Q3SURFACEPARM_NONSOLID, Q3SURFACEPARM_ORIGIN, Q3SURFACEPARM_PLAYERCLIP, Q3SURFACEPARM_POINTLIGHT, Q3SURFACEPARM_SKY, Q3SURFACEPARM_SLICK, Q3SURFACEPARM_SLIME, Q3SURFACEPARM_STRUCTURAL, Q3SURFACEPARM_TRANS, Q3SURFACEPARM_WATER, Q3TCGEN_ENVIRONMENT, Q3TCGEN_LIGHTMAP, Q3TCGEN_MAXPARMS, Q3TCGEN_TEXTURE, Q3TCGEN_VECTOR, Q3TCMOD_ENTITYTRANSLATE, Q3TCMOD_MAXPARMS, Q3TCMOD_PAGE, Q3TCMOD_ROTATE, Q3TCMOD_SCALE, Q3TCMOD_SCROLL, Q3TCMOD_STRETCH, Q3TCMOD_TRANSFORM, Q3TCMOD_TURBULENT, Q3TEXTUREFLAG_CAMERA, Q3TEXTUREFLAG_NOPICMIP, Q3TEXTUREFLAG_POLYGONOFFSET, Q3TEXTUREFLAG_REFLECTION, Q3TEXTUREFLAG_REFRACTION, Q3TEXTUREFLAG_TRANSPARENTSORT, Q3TEXTUREFLAG_TWOSIDED, Q3TEXTUREFLAG_WATERSHADER, Q3WAVEPARMS, shader_t::r_water_wateralpha, shader_t::r_water_waterscroll, shader_t::reflectcolor4f, shader_t::reflectfactor, shader_t::reflectmax, shader_t::reflectmin, shader_t::refractcolor4f, shader_t::refractfactor, shader_t::rtlightambient, shader_t::skyboxname, shader_t::specularpowermod, shader_t::specularscalemod, strlen(), shader_t::surfaceflags, shader_t::surfaceparms, tempmempool, TEXF_ALPHA, TEXF_CLAMP, TEXF_COMPRESS, TEXF_MIPMAP, TEXF_PICMIP, TEXTURE_MAXFRAMES, shader_t::textureblendalpha, shader_t::textureflags, shader_t::transparentsort, TRANSPARENTSORT_DISTANCE, TRANSPARENTSORT_HUD, TRANSPARENTSORT_SKY, cvar_t::value, Vector4Set, shader_t::vertexalpha, q3shaderinfo_deform_t::wavefunc, and q3shaderinfo_deform_t::waveparms.
Referenced by Mod_LoadModel(), and Mod_LookupQ3Shader().
|
static |
Definition at line 1381 of file model_shared.c.
References bound, Con_DPrintf(), offset, Q3WAVEFUNC_INVERSESAWTOOTH, Q3WAVEFUNC_NOISE, Q3WAVEFUNC_NONE, Q3WAVEFUNC_SAWTOOTH, Q3WAVEFUNC_SIN, Q3WAVEFUNC_SQUARE, Q3WAVEFUNC_TRIANGLE, and Q3WAVEFUNC_USER_SHIFT.
Referenced by Mod_LoadQ3Shaders().
skinfile_t * Mod_LoadSkinFiles | ( | void | ) |
Definition at line 2705 of file model_shared.c.
References COM_ParseToken_QuakeC(), com_token, Con_Printf(), data, developer_loading, dp_strlcpy, first, FS_LoadFile(), i, cvar_t::integer, skinfile_t::items, loadmodel, MAX_QPATH, Mem_Alloc, Mem_Free, model_t::mempool, model_t::name, skinfileitem_t::name, skinfile_t::next, skinfileitem_t::next, NULL, model_t::numskins, skinfileitem_t::replacement, tempmempool, and va().
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
qbool Mod_LoadTextureFromQ3Shader | ( | mempool_t * | mempool, |
const char * | modelname, | ||
texture_t * | texture, | ||
const char * | name, | ||
qbool | warnmissing, | ||
qbool | fallback, | ||
int | defaulttexflags, | ||
int | defaultmaterialflags ) |
Definition at line 2270 of file model_shared.c.
References q3shaderinfo_layer_alphagen_t::alphagen, q3shaderinfo_layer_t::alphagen, q3shaderinfo_layer_t::alphatest, shader_t::biaspolygonfactor, shader_t::biaspolygonoffset, q3shaderinfo_layer_t::blendfunc, model_t::brush, ca_dedicated, cls, Con_DPrintf(), Con_Printf(), shader_t::deforms, developer_extra, developer_loading, dp_strlcpy, shader_t::dpmeshcollisions, shader_t::dpnortlight, shader_t::dpnoshadow, shader_t::dpreflectcube, shader_t::dpshaderkill, shader_t::dpshadow, dpsnprintf(), q3shaderinfo_layer_t::dptexflags, GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_ZERO, i, cvar_t::integer, shader_t::layers, shader_t::lighting, loadmodel, MATERIALFLAG_ADD, MATERIALFLAG_ALPHA, MATERIALFLAG_ALPHAGEN_VERTEX, MATERIALFLAG_ALPHATEST, MATERIALFLAG_BLENDED, MATERIALFLAG_CAMERA, MATERIALFLAG_CUSTOMBLEND, MATERIALFLAG_FULLBRIGHT, MATERIALFLAG_MESHCOLLISIONS, MATERIALFLAG_NOCULLFACE, MATERIALFLAG_NODRAW, MATERIALFLAG_NORTLIGHT, MATERIALFLAG_NOSHADOW, MATERIALFLAG_REFLECTION, MATERIALFLAG_REFRACTION, MATERIALFLAG_SKY, MATERIALFLAG_VERTEXCOLOR, MATERIALFLAG_WALL, MATERIALFLAG_WATERSHADER, Mod_CreateShaderPass(), Mod_CreateShaderPassFromQ3ShaderLayer(), Mod_LookupQ3Shader(), mod_noshader_default_offsetmapping, Mod_Q2BSP_SuperContentsFromNativeContents(), mod_q3shader_default_refractive_index, name, NULL, shader_t::numlayers, shader_t::offsetbias, shader_t::offsetmapping, OFFSETMAPPING_DEFAULT, OFFSETMAPPING_OFF, shader_t::offsetscale, Q3ALPHAGEN_LIGHTINGSPECULAR, Q3ALPHAGEN_VERTEX, Q3RGBGEN_LIGHTINGDIFFUSE, Q3RGBGEN_VERTEX, Q3SURFACEFLAG_ALPHASHADOW, Q3SURFACEFLAG_DUST, Q3SURFACEFLAG_HINT, Q3SURFACEFLAG_LIGHTFILTER, Q3SURFACEFLAG_METALSTEPS, Q3SURFACEFLAG_NODAMAGE, Q3SURFACEFLAG_NODLIGHT, Q3SURFACEFLAG_NODRAW, Q3SURFACEFLAG_NOIMPACT, Q3SURFACEFLAG_NOLIGHTMAP, Q3SURFACEFLAG_NOMARKS, Q3SURFACEFLAG_NONSOLID, Q3SURFACEFLAG_POINTLIGHT, Q3SURFACEFLAG_SKY, Q3SURFACEFLAG_SLICK, Q3SURFACEPARM_ALPHASHADOW, Q3SURFACEPARM_BOTCLIP, Q3SURFACEPARM_DONOTENTER, Q3SURFACEPARM_DUST, Q3SURFACEPARM_HINT, Q3SURFACEPARM_LAVA, Q3SURFACEPARM_LIGHTFILTER, Q3SURFACEPARM_METALSTEPS, Q3SURFACEPARM_NODAMAGE, Q3SURFACEPARM_NODLIGHT, Q3SURFACEPARM_NODRAW, Q3SURFACEPARM_NODROP, Q3SURFACEPARM_NOIMPACT, Q3SURFACEPARM_NOLIGHTMAP, Q3SURFACEPARM_NOMARKS, Q3SURFACEPARM_NONSOLID, Q3SURFACEPARM_PLAYERCLIP, Q3SURFACEPARM_POINTLIGHT, Q3SURFACEPARM_SKY, Q3SURFACEPARM_SLICK, Q3SURFACEPARM_SLIME, Q3SURFACEPARM_WATER, Q3TEXTUREFLAG_CAMERA, Q3TEXTUREFLAG_POLYGONOFFSET, Q3TEXTUREFLAG_REFLECTION, Q3TEXTUREFLAG_REFRACTION, Q3TEXTUREFLAG_TWOSIDED, Q3TEXTUREFLAG_WATERSHADER, R_GetCubemap(), R_SkinFrame_LoadExternal(), R_SkinFrame_LoadMissing(), shader_t::r_water_wateralpha, shader_t::r_water_waterscroll, shader_t::reflectcolor4f, shader_t::reflectfactor, shader_t::reflectmax, shader_t::reflectmin, shader_t::refractcolor4f, shader_t::refractfactor, q3shaderinfo_layer_rgbgen_t::rgbgen, q3shaderinfo_layer_t::rgbgen, shader_t::rtlightambient, model_brush_t::skybox, shader_t::skyboxname, shader_t::specularpowermod, shader_t::specularscalemod, client_static_t::state, SUPERCONTENTS_BOTCLIP, SUPERCONTENTS_DONOTENTER, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, SUPERCONTENTS_WATER, shader_t::surfaceflags, shader_t::surfaceparms, TEXF_COMPRESS, TEXF_ISSPRITE, TEXF_ISWORLD, TEXF_PICMIP, texture, shader_t::textureflags, q3shaderinfo_layer_t::texturename, shader_t::transparentsort, TRANSPARENTSORT_DISTANCE, cvar_t::value, Vector2Copy, Vector4Copy, and shader_t::vertexalpha.
Referenced by CL_Beams_SetupExternalTexture(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_Mesh_GetTexture(), Mod_Q1BSP_LoadTextures(), Mod_Q2BSP_LoadTexinfo(), and Mod_Q3BSP_LoadTextures().
shader_t * Mod_LookupQ3Shader | ( | const char * | name | ) |
Definition at line 2219 of file model_shared.c.
References q3shader_hash_entry_t::chain, CRC_Block_CaseInsensitive(), q3shader_data_t::hash, Mod_LoadQ3Shaders(), name, shader_t::name, NULL, q3shader_data, Q3SHADER_HASH_SIZE, q3shaders_mem, q3shader_hash_entry_t::shader, and strlen().
Referenced by Mod_LoadTextureFromQ3Shader().
Definition at line 2936 of file model_shared.c.
References ca_dedicated, cls, Mod_MakeSortedSurfaces_qsortsurface_t::effect, Mod_MakeSortedSurfaces_qsortsurface_t::lightmaptexture, loadmodel, Mem_Alloc, Mem_Free, model_t::mempool, mod(), Mod_MakeSortedSurfaces_qsortfunc(), client_static_t::state, Mod_MakeSortedSurfaces_qsortsurface_t::surfaceindex, and Mod_MakeSortedSurfaces_qsortsurface_t::texture.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 2913 of file model_shared.c.
References a, b, Mod_MakeSortedSurfaces_qsortsurface_t::effect, Mod_MakeSortedSurfaces_qsortsurface_t::lightmaptexture, r, Mod_MakeSortedSurfaces_qsortsurface_t::surfaceindex, and Mod_MakeSortedSurfaces_qsortsurface_t::texture.
Referenced by Mod_MakeSortedSurfaces().
msurface_t * Mod_Mesh_AddSurface | ( | model_t * | mod, |
texture_t * | tex, | ||
qbool | batchwithprevioussurface ) |
Definition at line 4528 of file model_shared.c.
References texture_t::basematerialflags, MATERIALFLAG_CAMERA, MATERIALFLAG_REFLECTION, MATERIALFLAG_REFRACTION, MATERIALFLAG_SKY, MATERIALFLAG_WATERSHADER, max, Mem_Realloc, mod(), msurface_t::num_firsttriangle, msurface_t::num_firstvertex, R_Mod_DrawAddWaterPlanes(), R_Mod_DrawSky(), and msurface_t::texture.
Referenced by CL_Beam_AddPolygons(), DrawQ_Line(), DrawQ_Pic(), DrawQ_RotPic(), DrawQ_String_Scale(), DrawQ_SuperPic(), R_DebugLine(), and VM_CL_R_PolygonEnd().
Definition at line 4633 of file model_shared.c.
References surfmesh_t::data_element3i, surfmesh_t::data_element3s, max, surfmesh_t::max_triangles, Mem_Realloc, mod(), msurface_t::num_triangles, and surfmesh_t::num_triangles.
Referenced by CL_Beam_AddQuad(), DrawQ_Line(), DrawQ_Pic(), DrawQ_RotPic(), DrawQ_String_Scale(), DrawQ_SuperPic(), R_DebugLine(), and VM_CL_R_PolygonEnd().
Definition at line 4680 of file model_shared.c.
References i, max, mod(), sqrt(), VectorClear, VectorCopy, VectorSet, x, x2, y, y2, and z.
Referenced by Mod_Mesh_Finalize().
Definition at line 4443 of file model_shared.c.
References dp_strlcpy, Mem_AllocPool, mod(), name, NULL, R_AllocTexturePool(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), and R_Mod_GetLightInfo().
Referenced by CL_MeshEntities_Init(), CL_MeshEntities_Restart(), and CL_MeshEntities_Start().
Definition at line 4458 of file model_shared.c.
References mod(), and Mod_UnloadModel().
Referenced by CL_MeshEntities_Restart(), and CL_MeshEntities_Shutdown().
Definition at line 4775 of file model_shared.c.
References r_refdef_t::draw2dstage, gl_paranoid, cvar_t::integer, mod(), Mod_BuildTextureVectorsFromNormals(), Mod_Mesh_ComputeBounds(), Mod_Mesh_MakeSortedSurfaces(), Mod_Mesh_UploadDynamicBuffers(), Mod_Mesh_Validate(), and r_refdef.
Referenced by CL_MeshEntities_Scene_FinalizeRenderEntity(), and DrawQ_FlushUI().
texture_t * Mod_Mesh_GetTexture | ( | model_t * | mod, |
const char * | name, | ||
int | defaultdrawflags, | ||
int | defaulttexflags, | ||
int | defaultmaterialflags ) |
Definition at line 4476 of file model_shared.c.
References texture_t::basematerialflags, texture_t::currentmaterialflags, texture_t::customblendfunc, DRAWFLAG_2XMODULATE, DRAWFLAG_ADDITIVE, DRAWFLAG_MASK, DRAWFLAG_MODULATE, DRAWFLAG_SCREEN, GL_DST_COLOR, GL_ONE, GL_ONE_MINUS_DST_COLOR, GL_SRC_COLOR, GL_ZERO, i, MATERIALFLAG_ADD, MATERIALFLAG_BLENDED, MATERIALFLAG_CUSTOMBLEND, max, Mem_Realloc, texture_t::mesh_defaultmaterialflags, texture_t::mesh_defaulttexflags, texture_t::mesh_drawflag, mod(), Mod_LoadTextureFromQ3Shader(), name, and texture_t::name.
Referenced by DrawQ_Line(), DrawQ_Pic(), DrawQ_RotPic(), DrawQ_String_Scale(), DrawQ_SuperPic(), R_DebugLine(), and VM_CL_R_PolygonEnd().
int Mod_Mesh_IndexForVertex | ( | model_t * | mod, |
msurface_t * | surf, | ||
float | x, | ||
float | y, | ||
float | z, | ||
float | nx, | ||
float | ny, | ||
float | nz, | ||
float | s, | ||
float | t, | ||
float | u, | ||
float | v, | ||
float | r, | ||
float | g, | ||
float | b, | ||
float | a ) |
Definition at line 4554 of file model_shared.c.
References a, b, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_normal3f, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordtexture2f, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, surfmesh_t::data_vertexhash, g, int(), mask, max, surfmesh_t::max_vertices, msurface_t::maxs, Mem_Realloc, msurface_t::mins, mod(), msurface_t::num_firstvertex, surfmesh_t::num_vertexhashsize, msurface_t::num_vertices, surfmesh_t::num_vertices, r, v, VectorSet, x, y, and z.
Referenced by CL_Beam_AddQuad(), DrawQ_Line(), DrawQ_Pic(), DrawQ_RotPic(), DrawQ_String_Scale(), DrawQ_SuperPic(), R_DebugLine(), and VM_CL_R_PolygonEnd().
Definition at line 4652 of file model_shared.c.
Referenced by Mod_Mesh_Finalize().
Definition at line 4465 of file model_shared.c.
Referenced by CL_MeshEntities_Scene_Clear(), and DrawQ_FlushUI().
Definition at line 4760 of file model_shared.c.
References mod(), NULL, R_BUFFERDATA_INDEX16, R_BUFFERDATA_INDEX32, R_BufferData_Store(), and R_BUFFERDATA_VERTEX.
Referenced by Mod_Mesh_Finalize().
Definition at line 4736 of file model_shared.c.
References Con_DPrintf(), CON_WARN, first, i, mod(), msurface_t::num_firsttriangle, msurface_t::num_firstvertex, msurface_t::num_triangles, and msurface_t::num_vertices.
Referenced by Mod_Mesh_Finalize().
Definition at line 122 of file model_shared.c.
References cl_stainmaps_clearonload, msurface_lightmapinfo_t::extents, i, int(), cvar_t::integer, msurface_t::lightmapinfo, Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), models, Q3SHADER_MAXLAYERS, R_SkinFrame_MarkUsed(), and msurface_lightmapinfo_t::stainsamples.
Referenced by Mod_RenderInit().
|
static |
Definition at line 716 of file model_shared.c.
References cl, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Print(), Mod_ForName(), client_state_t::model_name, and NULL.
Referenced by Mod_Init().
|
static |
Definition at line 692 of file model_shared.c.
References Con_Print(), Con_Printf(), i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), and models.
Referenced by Mod_Init().
Definition at line 574 of file model_shared.c.
References i, int(), Mem_ExpandableArray_FreeRecord(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), Mod_UnloadModel(), and models.
Referenced by CL_SignonReply(), and SV_SpawnServer().
Definition at line 661 of file model_shared.c.
References count, i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), Mod_LoadModel(), models, SCR_PopLoadingScreen(), and SCR_PushLoadingScreen().
int Mod_RemoveDegenerateTriangles | ( | int | numtriangles, |
const int * | inelement3i, | ||
int * | outelement3i, | ||
const float * | vertex3f ) |
Definition at line 2841 of file model_shared.c.
References CrossProduct, i, VectorCopy, VectorLength2, and VectorSubtract.
Referenced by Mod_Q3BSP_LoadFaces().
Definition at line 206 of file model_shared.c.
References mod_newmap(), mod_shutdown(), mod_start(), NULL, and R_RegisterModule().
Referenced by Render_Init().
Sets the mod->DrawSky and mod->DrawAddWaterPlanes pointers conditionally based on whether surfaces in this submodel use these features called specifically by brush model loaders when generating submodels automatically called after model loader returns.
Definition at line 2887 of file model_shared.c.
References MATERIALFLAG_CAMERA, MATERIALFLAG_REFLECTION, MATERIALFLAG_REFRACTION, MATERIALFLAG_SKY, MATERIALFLAG_WATERSHADER, mod(), NULL, R_Mod_DrawAddWaterPlanes(), and R_Mod_DrawSky().
Referenced by Mod_LoadModel(), Mod_OBJ_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), and Mod_Q3BSP_Load().
void Mod_ShadowMesh_AddMesh | ( | shadowmesh_t * | mesh, |
const float * | vertex3f, | ||
int | numtris, | ||
const int * | element3i ) |
Definition at line 1041 of file model_shared.c.
References CL_KeepaliveMessage(), Con_Print(), CON_WARN, shadowmesh_t::element3i, i, Mem_Size(), Mod_ShadowMesh_AddVertex(), and shadowmesh_t::numtriangles.
Referenced by Mod_CreateCollisionMesh(), and R_Shadow_ShadowMapFromList().
int Mod_ShadowMesh_AddVertex | ( | shadowmesh_t * | mesh, |
const float * | vertex3f ) |
Definition at line 1019 of file model_shared.c.
References int(), shadowmeshvertexhash_t::next, shadowmesh_t::numverts, SHADOWMESHVERTEXHASH, shadowmesh_t::vertex3f, shadowmesh_t::vertexhashentries, and shadowmesh_t::vertexhashtable.
Referenced by Mod_ShadowMesh_AddMesh().
shadowmesh_t * Mod_ShadowMesh_Alloc | ( | mempool_t * | mempool, |
int | maxverts, | ||
int | maxtriangles ) |
Definition at line 1000 of file model_shared.c.
References shadowmesh_t::element3i, shadowmesh_t::maxtriangles, shadowmesh_t::maxverts, Mem_Alloc, shadowmesh_t::mempool, shadowmesh_t::numtriangles, shadowmesh_t::numverts, SHADOWMESHVERTEXHASH, shadowmesh_t::sideoffsets, shadowmesh_t::sidetotals, shadowmesh_t::vertex3f, shadowmesh_t::vertexhashentries, and shadowmesh_t::vertexhashtable.
Referenced by Mod_ShadowMesh_Begin().
shadowmesh_t * Mod_ShadowMesh_Begin | ( | mempool_t * | mempool, |
int | maxverts, | ||
int | maxtriangles ) |
Definition at line 1063 of file model_shared.c.
References CL_KeepaliveMessage(), and Mod_ShadowMesh_Alloc().
Referenced by Mod_CreateCollisionMesh(), and R_Mod_CompileShadowMap().
void Mod_ShadowMesh_CalcBBox | ( | shadowmesh_t * | mesh, |
vec3_t | mins, | ||
vec3_t | maxs, | ||
vec3_t | center, | ||
float * | radius ) |
Definition at line 1136 of file model_shared.c.
References DotProduct, i, maxs, mins, sqrt(), v, VectorClear, VectorCopy, VectorSubtract, and shadowmesh_t::vertex3f.
|
static |
Definition at line 1071 of file model_shared.c.
References shadowmesh_t::element3i, shadowmesh_t::element3i_indexbuffer, shadowmesh_t::element3s, shadowmesh_t::element3s_indexbuffer, Mod_ValidateElements(), shadowmesh_t::numtriangles, shadowmesh_t::numverts, R_Mesh_CreateMeshBuffer(), shadowmesh_t::vbo_vertexbuffer, shadowmesh_t::vbooffset_vertex3f, and shadowmesh_t::vertex3f.
Referenced by Mod_ShadowMesh_Finish().
shadowmesh_t * Mod_ShadowMesh_Finish | ( | shadowmesh_t * | mesh, |
qbool | createvbo ) |
Definition at line 1099 of file model_shared.c.
References CL_KeepaliveMessage(), shadowmesh_t::element3i, shadowmesh_t::element3s, i, shadowmesh_t::maxtriangles, shadowmesh_t::maxverts, Mem_Alloc, Mem_Free, Mem_Realloc, shadowmesh_t::mempool, Mod_ShadowMesh_CreateVBOs(), NULL, shadowmesh_t::numtriangles, shadowmesh_t::numverts, shadowmesh_t::vertex3f, shadowmesh_t::vertexhashentries, and shadowmesh_t::vertexhashtable.
Referenced by Mod_CreateCollisionMesh(), and R_Mod_CompileShadowMap().
void Mod_ShadowMesh_Free | ( | shadowmesh_t * | mesh | ) |
Definition at line 1175 of file model_shared.c.
References shadowmesh_t::element3i, shadowmesh_t::element3i_indexbuffer, shadowmesh_t::element3s, shadowmesh_t::element3s_indexbuffer, Mem_Free, R_Mesh_DestroyMeshBuffer(), shadowmesh_t::vbo_vertexbuffer, shadowmesh_t::vertex3f, shadowmesh_t::vertexhashentries, and shadowmesh_t::vertexhashtable.
Referenced by R_RTLight_Uncompile().
Definition at line 108 of file model_shared.c.
References i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), Mod_FreeQ3Shaders(), Mod_Skeletal_FreeBuffers(), Mod_UnloadModel(), and models.
Referenced by Mod_RenderInit().
Definition at line 85 of file model_shared.c.
References count, i, int(), Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), mod(), Mod_LoadModel(), models, SCR_PopLoadingScreen(), and SCR_PushLoadingScreen().
Referenced by Mod_RenderInit().
Removes all shaderpasses from material, and optionally deletes the textures in the skinframes.
Definition at line 2685 of file model_shared.c.
References i, Mem_Free, NULL, R_SkinFrame_PurgeSkinFrame(), and texture.
Definition at line 211 of file model_shared.c.
References Con_Printf(), developer_loading, dp_strlcpy, cvar_t::integer, MAX_QPATH, Mem_FreePool, mod(), name, NULL, R_FreeTexturePool(), and R_Mesh_DestroyMeshBuffer().
Referenced by Mod_LoadModel(), Mod_Mesh_Destroy(), Mod_PurgeUnused(), and mod_shutdown().
qbool Mod_ValidateElements | ( | int * | element3i, |
unsigned short * | element3s, | ||
int | numtriangles, | ||
int | firstvertex, | ||
int | numvertices, | ||
const char * | filename, | ||
int | fileline ) |
Definition at line 738 of file model_shared.c.
References Con_Print(), Con_Printf(), first, and i.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_ShadowMesh_CreateVBOs(), and Mod_ZYMOTICMODEL_Load().
void Mod_VertexRangeFromElements | ( | int | numelements, |
const int * | elements, | ||
int * | firstvertexpointer, | ||
int * | lastvertexpointer ) |
Definition at line 2865 of file model_shared.c.
Definition at line 1408 of file model_shared.c.
References q3shader_hash_entry_t::chain, Con_DPrintf(), CRC_Block_CaseInsensitive(), shader_t::dpshaderkill, q3shader_data_t::hash, q3shader_data_t::hash_entries, Mem_ExpandableArray_AllocRecord(), shader_t::name, NULL, q3shader_data, Q3SHADER_HASH_SIZE, q3shader_hash_entry_t::shader, and strlen().
Referenced by Mod_LoadQ3Shaders().
|
static |
float lmaxis[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}} |
Definition at line 4121 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLightmaps().
|
static |
Definition at line 45 of file model_shared.c.
Referenced by Mod_LoadModel().
model_t * loadmodel |
Definition at line 42 of file model_shared.c.
Referenced by Mod_Alias_CalculateBoundingBox(), Mod_Alias_MorphMesh_CompileFrames(), Mod_AllocSurfMesh(), Mod_BSP_DecompressVis(), Mod_BSP_FinalizePortals(), Mod_BSP_LoadNodes_RecursiveSetParent(), Mod_BSP_LoadSubmodels(), Mod_BSP_MakePortals(), Mod_BSP_RecursiveNodePortals(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildBaseBonePoses(), Mod_BuildVBOs(), Mod_DARKPLACESMODEL_Load(), Mod_GenerateLightmaps(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_IDS2_Load(), Mod_IDSP_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_LoadModel(), Mod_LoadSkinFiles(), Mod_LoadTextureFromQ3Shader(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDL_LoadFrames(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_CheckWaterAlphaSupport(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadClipnodes(), Mod_Q1BSP_LoadEdges(), Mod_Q1BSP_LoadEntities(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadLeaffaces(), Mod_Q1BSP_LoadLeafs(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_LoadNodes(), Mod_Q1BSP_LoadPlanes(), Mod_Q1BSP_LoadSplitSky(), Mod_Q1BSP_LoadSurfedges(), Mod_Q1BSP_LoadTexinfo(), Mod_Q1BSP_LoadTextures(), Mod_Q1BSP_LoadVertexes(), Mod_Q1BSP_LoadVisibility(), Mod_Q1BSP_MakeHull0(), Mod_Q1BSP_ParseWadsFromEntityLump(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), Mod_Q2BSP_LoadBrushSides(), Mod_Q2BSP_LoadLeafBrushes(), Mod_Q2BSP_LoadLeafs(), Mod_Q2BSP_LoadLighting(), Mod_Q2BSP_LoadNodes(), Mod_Q2BSP_LoadTexinfo(), Mod_Q2BSP_LoadVisibility(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadBrushSides(), Mod_Q3BSP_LoadBrushSides_IG(), Mod_Q3BSP_LoadEffects(), Mod_Q3BSP_LoadEntities(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLeafBrushes(), Mod_Q3BSP_LoadLeafFaces(), Mod_Q3BSP_LoadLeafs(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadModels(), Mod_Q3BSP_LoadNodes(), Mod_Q3BSP_LoadPlanes(), Mod_Q3BSP_LoadPVS(), Mod_Q3BSP_LoadTextures(), Mod_Q3BSP_LoadTriangles(), Mod_Q3BSP_LoadVertices(), Mod_Q3BSP_RecursiveFindNumLeafs(), Mod_Sprite_SharedSetup(), Mod_SpriteSetupTexture(), Mod_VBSP_LoadEdges(), Mod_VBSP_LoadEntities(), Mod_VBSP_LoadFaces(), Mod_VBSP_LoadPlanes(), Mod_VBSP_LoadSurfedges(), Mod_VBSP_LoadTexinfo(), Mod_VBSP_LoadVertexes(), and Mod_ZYMOTICMODEL_Load().
unsigned char* mod_base |
Definition at line 682 of file model_shared.c.
Referenced by Mod_Q3BSP_Load(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadBrushSides(), Mod_Q3BSP_LoadBrushSides_IG(), Mod_Q3BSP_LoadEffects(), Mod_Q3BSP_LoadEntities(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLeafBrushes(), Mod_Q3BSP_LoadLeafFaces(), Mod_Q3BSP_LoadLeafs(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadModels(), Mod_Q3BSP_LoadNodes(), Mod_Q3BSP_LoadPlanes(), Mod_Q3BSP_LoadPVS(), Mod_Q3BSP_LoadTextures(), Mod_Q3BSP_LoadTriangles(), and Mod_Q3BSP_LoadVertices().
cvar_t mod_generatelightmaps_borderpixels = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_borderpixels", "2", "extra space around polygons to prevent sampling artifacts"} |
Definition at line 33 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), and Mod_Init().
cvar_t mod_generatelightmaps_gridradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_gridradius", "64", "sampling area around each lightgrid cell center"} |
Definition at line 40 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
cvar_t mod_generatelightmaps_gridsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_gridsamples", "64", "number of shadow tests done per lightgrid cell"} |
Definition at line 37 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
|
static |
Definition at line 3577 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLights(), Mod_GenerateLightmaps_DestroyLights(), and Mod_GenerateLightmaps_SamplePoint().
cvar_t mod_generatelightmaps_lightmapradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_lightmapradius", "16", "sampling area around each lightmap pixel"} |
Definition at line 38 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
cvar_t mod_generatelightmaps_lightmapsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_lightmapsamples", "16", "number of shadow tests done per lightmap pixel"} |
Definition at line 35 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
lightmaptriangle_t* mod_generatelightmaps_lightmaptriangles |
Definition at line 3570 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), Mod_GenerateLightmaps_CreateTriangleInformation(), and Mod_GenerateLightmaps_DestroyTriangleInformation().
|
static |
Definition at line 3576 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLights(), Mod_GenerateLightmaps_DestroyLights(), and Mod_GenerateLightmaps_SamplePoint().
|
static |
Definition at line 3573 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_InitSampleOffsets(), Mod_GenerateLightmaps_LightmapSample(), and Mod_GenerateLightmaps_VertexSample().
|
static |
Definition at line 3574 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_GridSample(), Mod_GenerateLightmaps_InitSampleOffsets(), Mod_GenerateLightmaps_LightmapSample(), and Mod_GenerateLightmaps_VertexSample().
cvar_t mod_generatelightmaps_texturesize = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_texturesize", "1024", "size of lightmap textures"} |
Definition at line 34 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), and Mod_Init().
cvar_t mod_generatelightmaps_unitspersample = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_unitspersample", "8", "lightmap resolution"} |
Definition at line 32 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_CreateLightmaps(), and Mod_Init().
cvar_t mod_generatelightmaps_vertexradius = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_vertexradius", "16", "sampling area around each vertex"} |
Definition at line 39 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
cvar_t mod_generatelightmaps_vertexsamples = {CF_CLIENT | CF_ARCHIVE, "mod_generatelightmaps_vertexsamples", "16", "number of shadow tests done per vertex"} |
Definition at line 36 of file model_shared.c.
Referenced by Mod_GenerateLightmaps_InitSampleOffsets(), and Mod_Init().
|
static |
Definition at line 67 of file model_shared.c.
Referenced by Mod_Init().
|
extern |
Definition at line 70 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Decompile_OBJ(), and Mod_OBJ_Load().
|
extern |
Definition at line 45 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_GenerateLightmaps(), and Mod_Q3BSP_LoadLightmaps().
|
static |
Definition at line 68 of file model_shared.c.
Referenced by CLVM_count_edicts(), Mod_ClearUsed(), Mod_FindName(), Mod_Init(), mod_newmap(), Mod_Print_f(), Mod_PurgeUnused(), Mod_Reload(), mod_shutdown(), mod_start(), and SVVM_count_edicts().
|
static |
Definition at line 83 of file model_shared.c.
Referenced by Mod_LoadQ3Shaders(), Mod_LookupQ3Shader(), and Q3Shader_AddToHash().
|
static |
Definition at line 70 of file model_shared.c.
Referenced by Mod_FreeQ3Shaders(), Mod_LoadModel(), Mod_LoadQ3Shaders(), and Mod_LookupQ3Shader().
cvar_t r_mipnormalmaps = {CF_CLIENT | CF_ARCHIVE, "r_mipnormalmaps", "1", "mipmaps normalmaps (turning it off looks sharper but may have aliasing)"} |
Definition at line 31 of file model_shared.c.
Referenced by Mod_Init(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), and R_SkinFrame_LoadInternalBGRA().
cvar_t r_mipskins = {CF_CLIENT | CF_ARCHIVE, "r_mipskins", "0", "mipmaps model skins so they render faster in the distance and do not display noise artifacts, can cause discoloration of skins if they contain undesirable border colors"} |
Definition at line 30 of file model_shared.c.
Referenced by Mod_BuildAliasSkinsFromSkinFiles(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_Init(), and R_LoadQWSkin().
|
extern |
Definition at line 153 of file r_shadow.c.
Referenced by Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), R_CompleteLightPoint(), R_Shadow_Init(), R_Shadow_MakeTextures(), R_Shadow_MakeTextures_SamplePoint(), and R_Shadow_RenderMode_Begin().
|
extern |
Definition at line 154 of file r_shadow.c.
Referenced by Mod_GenerateLightmaps_LightPoint(), Mod_GenerateLightmaps_SamplePoint(), R_CompleteLightPoint(), R_Shadow_Init(), R_Shadow_MakeTextures(), R_Shadow_MakeTextures_SamplePoint(), and R_Shadow_RenderMode_Begin().
|
extern |
Definition at line 2785 of file cl_main.c.
Referenced by Mod_ForName().