![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include <stddef.h>
#include "qdefs.h"
#include "bspfile.h"
#include "r_qshader.h"
#include "matrixlib.h"
#include "bih.h"
#include "model_brush.h"
#include "model_q1bsp.h"
#include "model_q2bsp.h"
#include "model_q3bsp.h"
#include "model_vbsp.h"
#include "model_sprite.h"
#include "model_alias.h"
Go to the source code of this file.
Data Structures | |
struct | animscene_t |
struct | blendweights_t |
struct | mod_alloclightmap_row_t |
struct | mod_alloclightmap_state_t |
struct | model_t |
struct | modloader_t |
struct | msurface_lightmapinfo_t |
struct | msurface_t |
describes the textures to use on a range of triangles in the model, and mins/maxs (AABB) for culling. More... | |
struct | mtexinfo_t |
struct | r_meshbuffer_t |
struct | shadowmesh_t |
struct | shadowmeshvertexhash_t |
struct | skinfile_t |
struct | skinfileitem_t |
struct | surfmesh_t |
struct | texture_t |
struct | texvecvertex_t |
Macros | |
#define | SHADOWMESHVERTEXHASH 1024 |
Enumerations | |
enum | modtype_t { mod_invalid , mod_brushq1 , mod_sprite , mod_alias , mod_brushq2 , mod_brushq3 , mod_brushhl2 , mod_obj , mod_null } |
enum | synctype_t { ST_SYNC =0 , ST_RAND } |
Functions | |
void | Mod_2PSB_Load (model_t *mod, void *buffer, void *bufferend) |
int | Mod_Alias_GetExtendedTagInfoForIndex (const model_t *model, unsigned int skin, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, int tagindex, int *parentindex, const char **tagname, matrix4x4_t *tag_localmatrix) |
int | Mod_Alias_GetTagIndexForName (const model_t *model, unsigned int skin, const char *tagname) |
int | Mod_Alias_GetTagMatrix (const model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, int tagindex, matrix4x4_t *outmatrix) |
void | Mod_AliasInit (void) |
qbool | Mod_AllocLightmap_Block (mod_alloclightmap_state_t *state, int blockwidth, int blockheight, int *outx, int *outy) |
void | Mod_AllocLightmap_Free (mod_alloclightmap_state_t *state) |
void | Mod_AllocLightmap_Init (mod_alloclightmap_state_t *state, struct mempool_s *mempool, int width, int height) |
void | Mod_AllocLightmap_Reset (mod_alloclightmap_state_t *state) |
void | Mod_AllocSurfMesh (struct mempool_s *mempool, int numvertices, int numtriangles, qbool lightmapoffsets, qbool vertexcolors) |
void | Mod_BrushInit (void) |
void | Mod_BSP2_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_BuildAliasSkinsFromSkinFiles (texture_t *skin, skinfile_t *skinfile, const char *meshname, const char *shadername) |
void | Mod_BuildNormals (int firstvertex, int numvertices, int numtriangles, const float *vertex3f, const int *elements, float *normal3f, qbool areaweighting) |
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) |
void | Mod_BuildVBOs (void) |
int | Mod_BuildVertexRemapTableFromElements (int numelements, const int *elements, int numvertices, int *remapvertices) |
void | Mod_ClearUsed (void) |
int | Mod_CollisionBIH_PointSuperContents (struct model_s *model, int frame, const vec3_t point) |
int | Mod_CollisionBIH_PointSuperContents_Mesh (struct model_s *model, int frame, const vec3_t point) |
void | Mod_CollisionBIH_TraceBox (model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask) |
void | Mod_CollisionBIH_TraceBrush (model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, struct colbrushf_s *start, struct colbrushf_s *end, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask) |
void | Mod_CollisionBIH_TraceLine (model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, const vec3_t start, const vec3_t end, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask) |
qbool | Mod_CollisionBIH_TraceLineOfSight (struct model_s *model, const vec3_t start, const vec3_t end, const vec3_t acceptmins, const vec3_t acceptmaxs) |
void | Mod_CollisionBIH_TracePoint (model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, const vec3_t start, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask) |
void | Mod_CollisionBIH_TracePoint_Mesh (model_t *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, struct trace_s *trace, const vec3_t start, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask) |
int | Mod_CountSkinFiles (skinfile_t *skinfile) |
void | Mod_CreateCollisionMesh (model_t *mod) |
texture_shaderpass_t * | Mod_CreateShaderPass (struct mempool_s *mempool, struct skinframe_s *skinframe) |
texture_shaderpass_t * | Mod_CreateShaderPassFromQ3ShaderLayer (struct mempool_s *mempool, const char *modelname, q3shaderinfo_layer_t *layer, int layerindex, int texflags, const char *texturename) |
void | Mod_DARKPLACESMODEL_Load (model_t *mod, void *buffer, void *bufferend) |
model_t * | Mod_FindName (const char *name, const char *parentname) |
model_t * | Mod_ForName (const char *name, qbool crash, qbool checkdisk, const char *parentname) |
void | Mod_FreeQ3Shaders (void) |
void | Mod_FreeSkinFiles (skinfile_t *skinfile) |
void | Mod_HLBSP_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IBSP_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IDP0_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IDP2_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IDP3_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IDS2_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_IDSP_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_Init (void) |
void | Mod_INTERQUAKEMODEL_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_LoadCustomMaterial (struct mempool_s *mempool, texture_t *texture, const char *name, int supercontents, int materialflags, struct skinframe_s *skinframe) |
Sets up a material to render the provided skinframe. See also R_SkinFrame_LoadInternalBGRA. | |
model_t * | Mod_LoadModel (model_t *mod, qbool crash, qbool checkdisk) |
void | Mod_LoadQ3Shaders (void) |
skinfile_t * | Mod_LoadSkinFiles (void) |
qbool | Mod_LoadTextureFromQ3Shader (struct mempool_s *mempool, const char *modelname, texture_t *texture, const char *name, qbool warnmissing, qbool fallback, int defaulttexflags, int defaultmaterialflags) |
shader_t * | Mod_LookupQ3Shader (const char *name) |
bih_t * | Mod_MakeCollisionBIH (model_t *model, qbool userendersurfaces, bih_t *out) |
void | Mod_MakeSortedSurfaces (model_t *mod) |
void | Mod_MAP_Load (model_t *mod, void *buffer, void *bufferend) |
msurface_t * | Mod_Mesh_AddSurface (model_t *mod, texture_t *tex, qbool batchwithprevioussurface) |
void | Mod_Mesh_AddTriangle (model_t *mod, msurface_t *surf, int e0, int e1, int e2) |
void | Mod_Mesh_Create (model_t *mod, const char *name) |
void | Mod_Mesh_Destroy (model_t *mod) |
void | Mod_Mesh_Finalize (model_t *mod) |
texture_t * | Mod_Mesh_GetTexture (model_t *mod, const char *name, int defaultdrawflags, int defaulttexflags, int defaultmaterialflags) |
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) |
void | Mod_Mesh_Reset (model_t *mod) |
void | Mod_Mesh_Validate (model_t *mod) |
void | Mod_OBJ_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_PSKMODEL_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_PurgeUnused (void) |
void | Mod_Q1BSP_Load (model_t *mod, void *buffer, void *bufferend) |
int | Mod_Q1BSP_NativeContentsFromSuperContents (int supercontents) |
int | Mod_Q1BSP_SuperContentsFromNativeContents (int nativecontents) |
int | Mod_Q2BSP_NativeContentsFromSuperContents (int supercontents) |
int | Mod_Q2BSP_SuperContentsFromNativeContents (int nativecontents) |
void | Mod_Reload (void) |
int | Mod_RemoveDegenerateTriangles (int numtriangles, const int *inelement3i, int *outelement3i, const float *vertex3f) |
void | Mod_RemoveStaleWorldModels (model_t *skip) |
void | Mod_SetDrawSkyAndWater (model_t *mod) |
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. | |
void | Mod_ShadowMesh_AddMesh (shadowmesh_t *mesh, const float *vertex3f, int numtris, const int *element3i) |
int | Mod_ShadowMesh_AddVertex (shadowmesh_t *mesh, const float *vertex3f) |
shadowmesh_t * | Mod_ShadowMesh_Alloc (struct mempool_s *mempool, int maxverts, int maxtriangles) |
shadowmesh_t * | Mod_ShadowMesh_Begin (struct mempool_s *mempool, int maxverts, int maxtriangles) |
void | Mod_ShadowMesh_CalcBBox (shadowmesh_t *firstmesh, vec3_t mins, vec3_t maxs, vec3_t center, float *radius) |
shadowmesh_t * | Mod_ShadowMesh_Finish (shadowmesh_t *firstmesh, qbool createvbo) |
void | Mod_ShadowMesh_Free (shadowmesh_t *mesh) |
void | Mod_Skeletal_FreeBuffers (void) |
void | Mod_SnapVertices (int numcomponents, int numvertices, float *vertices, float snap) |
void | Mod_SpriteInit (void) |
void | Mod_UnloadCustomMaterial (texture_t *texture, qbool purgeskins) |
Removes all shaderpasses from material, and optionally deletes the textures in the skinframes. | |
void | Mod_UnloadModel (model_t *mod) |
qbool | Mod_ValidateElements (int *element3i, unsigned short *element3s, int numtriangles, int firstvertex, int numvertices, const char *filename, int fileline) |
void | Mod_VBSP_Load (model_t *mod, void *buffer, void *bufferend) |
void | Mod_VertexRangeFromElements (int numelements, const int *elements, int *firstvertexpointer, int *lastvertexpointer) |
void | Mod_ZYMOTICMODEL_Load (model_t *mod, void *buffer, void *bufferend) |
void | R_Mod_CompileShadowMap (struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist) |
void | R_Mod_Draw (struct entity_render_s *ent) |
void | R_Mod_DrawAddWaterPlanes (struct entity_render_s *ent) |
void | R_Mod_DrawDebug (struct entity_render_s *ent) |
void | R_Mod_DrawDepth (struct entity_render_s *ent) |
void | R_Mod_DrawLight (struct entity_render_s *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs) |
void | R_Mod_DrawPrepass (struct entity_render_s *ent) |
void | R_Mod_DrawShadowMap (int side, struct entity_render_s *ent, const vec3_t relativelightorigin, const vec3_t relativelightdirection, float lightradius, int modelnumsurfaces, const int *modelsurfacelist, const unsigned char *surfacesides, const vec3_t lightmins, const vec3_t lightmaxs) |
void | R_Mod_DrawSky (struct entity_render_s *ent) |
void | R_Mod_GetLightInfo (struct entity_render_s *ent, vec3_t relativelightorigin, float lightradius, vec3_t outmins, vec3_t outmaxs, int *outleaflist, unsigned char *outleafpvs, int *outnumleafspointer, int *outsurfacelist, unsigned char *outsurfacepvs, int *outnumsurfacespointer, unsigned char *outshadowtrispvs, unsigned char *outlighttrispvs, unsigned char *visitingleafpvs, int numfrustumplanes, const mplane_t *frustumplanes, qbool noocclusion) |
Variables | |
model_t * | loadmodel |
char | loadname [32] |
unsigned char * | mod_base |
struct cvar_s | mod_noshader_default_offsetmapping |
struct cvar_s | mod_q3bsp_lightgrid_bsp_surfaces |
struct cvar_s | mod_q3bsp_lightgrid_texture |
struct cvar_s | mod_q3bsp_lightgrid_world_surfaces |
struct cvar_s | mod_q3shader_default_offsetmapping |
struct cvar_s | mod_q3shader_default_offsetmapping_bias |
struct cvar_s | mod_q3shader_default_offsetmapping_scale |
struct cvar_s | mod_q3shader_default_polygonfactor |
struct cvar_s | mod_q3shader_default_polygonoffset |
struct cvar_s | mod_q3shader_default_refractive_index |
struct cvar_s | mod_q3shader_force_addalpha |
struct cvar_s | mod_q3shader_force_terrain_alphaflag |
struct cvar_s | r_fullbrights |
struct cvar_s | r_mipnormalmaps |
struct cvar_s | r_mipskins |
#define SHADOWMESHVERTEXHASH 1024 |
Definition at line 152 of file model_shared.h.
Referenced by Mod_ShadowMesh_AddVertex(), and Mod_ShadowMesh_Alloc().
enum modtype_t |
Enumerator | |
---|---|
mod_invalid | |
mod_brushq1 | |
mod_sprite | |
mod_alias | |
mod_brushq2 | |
mod_brushq3 | |
mod_brushhl2 | |
mod_obj | |
mod_null |
Definition at line 43 of file model_shared.h.
enum synctype_t |
Definition at line 3881 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
int Mod_Alias_GetExtendedTagInfoForIndex | ( | const model_t * | model, |
unsigned int | skin, | ||
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
int | tagindex, | ||
int * | parentindex, | ||
const char ** | tagname, | ||
matrix4x4_t * | tag_localmatrix ) |
Definition at line 585 of file model_alias.c.
References i, model, and skin.
Referenced by CL_GetTagIndex(), SV_GetTagIndex(), VM_CL_setattachment(), VM_CL_skel_find_bone(), VM_SV_setattachment(), and VM_SV_skel_find_bone().
int Mod_Alias_GetTagMatrix | ( | const model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
int | tagindex, | ||
matrix4x4_t * | outmatrix ) |
Definition at line 189 of file model_alias.c.
References Con_Printf(), Cvar_RegisterVariable(), i, M_PI, mod_alias_force_animated, mod_alias_supporttagscale, mod_md3_sin, r_skeletal_debugbone, r_skeletal_debugbonecomponent, r_skeletal_debugbonevalue, r_skeletal_debugtranslatex, r_skeletal_debugtranslatey, r_skeletal_debugtranslatez, sin(), and Sys_HaveSSE.
Referenced by Mod_Init().
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, |
struct mempool_s * | mempool, | ||
int | width, | ||
int | height ) |
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 | ( | struct mempool_s * | mempool, |
int | numvertices, | ||
int | numtriangles, | ||
qbool | lightmapoffsets, | ||
qbool | vertexcolors ) |
Definition at line 80 of file model_brush.c.
References Cvar_RegisterVariable(), Cvar_SetQuick(), dp_strlcpy, GAME_NEXUIZ, gamemode, mod_bsp_portalize, mod_noshader_default_offsetmapping, mod_obj_orientation, mod_q1bsp_polygoncollisions, mod_q1bsp_texture_lava, mod_q1bsp_texture_sky, mod_q1bsp_texture_slime, mod_q1bsp_texture_solid, mod_q1bsp_texture_water, mod_q1bsp_traceoutofsolid, mod_q1bsp_zero_hullsize_cutoff, mod_q2bsp_littransparentsurfaces, mod_q3bsp_curves_collisions, mod_q3bsp_curves_subdivisions_maxtess, mod_q3bsp_curves_subdivisions_maxvertices, mod_q3bsp_curves_subdivisions_mintess, mod_q3bsp_curves_subdivisions_tolerance, mod_q3bsp_lightgrid_bsp_surfaces, mod_q3bsp_lightgrid_texture, mod_q3bsp_lightgrid_world_surfaces, mod_q3bsp_lightmapmergepower, mod_q3bsp_nolightmaps, mod_q3bsp_optimizedtraceline, mod_q3bsp_sRGBlightmaps, mod_q3bsp_tracelineofsight_brushes, mod_q3shader_default_offsetmapping, mod_q3shader_default_offsetmapping_bias, mod_q3shader_default_offsetmapping_scale, mod_q3shader_default_polygonfactor, mod_q3shader_default_polygonoffset, mod_q3shader_default_refractive_index, mod_q3shader_force_addalpha, mod_q3shader_force_terrain_alphaflag, mod_recalculatenodeboxes, texture_t::name, Q3SURFACEFLAG_NODLIGHT, Q3SURFACEFLAG_NOIMPACT, Q3SURFACEFLAG_NOLIGHTMAP, Q3SURFACEFLAG_NOMARKS, Q3SURFACEFLAG_SKY, r_nosurftextures, r_novis, r_subdivisions_maxtess, r_subdivisions_maxvertices, r_subdivisions_mintess, r_subdivisions_tolerance, r_trippy, texture_t::supercontents, SUPERCONTENTS_LAVA, SUPERCONTENTS_NODROP, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, SUPERCONTENTS_WATER, and texture_t::surfaceflags.
Referenced by Mod_Init().
Definition at line 3889 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
void Mod_BuildAliasSkinsFromSkinFiles | ( | texture_t * | skin, |
skinfile_t * | skinfile, | ||
const char * | meshname, | ||
const char * | shadername ) |
Definition at line 925 of file model_alias.c.
References Con_DPrintf(), developer_extra, i, Image_StripImageExtension(), cvar_t::integer, skinfile_t::items, loadmodel, MATERIALFLAG_NODRAW, MATERIALFLAG_NOSHADOW, MATERIALFLAG_WALL, MAX_QPATH, model_t::mempool, Mod_LoadCustomMaterial(), Mod_LoadTextureFromQ3Shader(), model_t::name, skinfileitem_t::name, skinfile_t::next, skinfileitem_t::next, model_t::num_surfaces, r_mipskins, R_SkinFrame_LoadMissing(), skinfileitem_t::replacement, skin, SUPERCONTENTS_SOLID, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, and TEXF_PICMIP.
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().
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().
Definition at line 7348 of file model_brush.c.
References Mod_CollisionBIH_TracePoint(), model, NULL, and trace_t::startsupercontents.
Referenced by Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
int Mod_CollisionBIH_PointSuperContents_Mesh | ( | struct model_s * | model, |
int | frame, | ||
const vec3_t | point ) |
Definition at line 7387 of file model_brush.c.
References trace_t::fraction, trace_t::hitsupercontents, trace_t::hitsupercontentsmask, Mod_CollisionBIH_TraceLine(), model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, and VectorSet.
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().
void Mod_CollisionBIH_TraceBox | ( | model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
struct trace_s * | trace, | ||
const vec3_t | start, | ||
const vec3_t | boxmins, | ||
const vec3_t | boxmaxs, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
void Mod_CollisionBIH_TraceBrush | ( | model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
struct trace_s * | trace, | ||
struct colbrushf_s * | start, | ||
struct colbrushf_s * | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
void Mod_CollisionBIH_TraceLine | ( | model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
struct trace_s * | trace, | ||
const vec3_t | start, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
qbool Mod_CollisionBIH_TraceLineOfSight | ( | struct model_s * | model, |
const vec3_t | start, | ||
const vec3_t | end, | ||
const vec3_t | acceptmins, | ||
const vec3_t | acceptmaxs ) |
Definition at line 7355 of file model_brush.c.
References BoxesOverlap, trace_t::endpos, trace_t::fraction, MATERIALFLAGMASK_TRANSLUCENT, Mod_CollisionBIH_TraceLine(), model, NULL, and SUPERCONTENTS_VISBLOCKERMASK.
void Mod_CollisionBIH_TracePoint | ( | model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
struct trace_s * | trace, | ||
const vec3_t | start, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
void Mod_CollisionBIH_TracePoint_Mesh | ( | model_t * | model, |
const struct frameblend_s * | frameblend, | ||
const struct skeleton_s * | skeleton, | ||
struct trace_s * | trace, | ||
const vec3_t | start, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
int Mod_CountSkinFiles | ( | skinfile_t * | skinfile | ) |
Definition at line 2826 of file model_shared.c.
References i, and skinfile_t::next.
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 | ( | struct mempool_s * | mempool, |
struct skinframe_s * | skinframe ) |
texture_shaderpass_t * Mod_CreateShaderPassFromQ3ShaderLayer | ( | struct mempool_s * | mempool, |
const char * | modelname, | ||
q3shaderinfo_layer_t * | layer, | ||
int | layerindex, | ||
int | texflags, | ||
const char * | texturename ) |
Definition at line 2163 of file model_alias.c.
References dpmheader_t::allradius, model_t::AnimateVertices, model_t::animscenes, BigFloat, BigLong, surfmesh_t::blends, dpmbonevert_t::bonenum, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), dpmheader_t::filesize, animscene_t::firstframe, aliasbone_t::flags, flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, dpmheader_t::id, dpmbonevert_t::influence, int(), cvar_t::integer, surfmesh_t::isanimated, loadmodel, animscene_t::loop, Matrix4x4_FromArray12FloatD3D(), Matrix4x4_ToBonePose7s(), max, dpmheader_t::maxs, Mem_Alloc, Mem_AllocType, Mem_ReallocType, model_t::mempool, dpmheader_t::mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildBaseBonePoses(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_Skeletal_CompressBlend(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, dpmbone_t::name, dpmframe_t::name, model_t::name, dpmbonevert_t::normal, model_t::normalmaxs, model_t::normalmins, NULL, surfmesh_t::num_blends, dpmheader_t::num_bones, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, dpmheader_t::num_frames, dpmheader_t::num_meshs, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, dpmmesh_t::num_tris, msurface_t::num_vertices, surfmesh_t::num_vertices, dpmmesh_t::num_verts, model_t::numframes, model_t::numskins, dpmheader_t::ofs_bones, dpmheader_t::ofs_frames, dpmmesh_t::ofs_indices, dpmheader_t::ofs_meshs, dpmmesh_t::ofs_texcoords, dpmmesh_t::ofs_verts, dpmbonevert_t::origin, aliasbone_t::parent, model_t::PointSuperContents, R_ConcatTransforms(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, dpmmesh_t::shadername, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, dpmheader_t::type, model_t::type, VectorLength, VectorNormalize, model_t::yawmaxs, model_t::yawmins, dpmheader_t::yawradius, Z_Free, and Z_Malloc.
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 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 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 3896 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
Definition at line 7876 of file model_brush.c.
References buffer, Host_Error(), i, LittleLong, mod(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Q2BSPVERSION, Q3BSPVERSION, Q3BSPVERSION_IG, and Q3BSPVERSION_LIVE.
Definition at line 972 of file model_alias.c.
References ALIAS_SINGLE, ALIAS_SKIN_SINGLE, ALIAS_VERSION, model_t::AnimateVertices, model_t::animscenes, BOUNDI, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), texture_t::currentframe, data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmdlvertex, model_t::data_surfaces, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, model_t::effects, animscene_t::firstframe, mdl_t::flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, loadmodel, animscene_t::loop, MATERIALFLAG_WALL, MAX_QPATH, Mem_Alloc, Mem_Free, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadCustomMaterial(), Mod_LoadSkinFiles(), Mod_LoadTextureFromQ3Shader(), Mod_MakeCollisionBIH(), Mod_MDL_AnimateVertices(), Mod_MDL_LoadFrames(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, animscene_t::name, model_t::name, name, model_t::nolerp, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, surfmesh_t::num_morphframes, surfmesh_t::num_morphmdlframescale, surfmesh_t::num_morphmdlframetranslate, model_t::num_poses, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, daliasgroup_t::numframes, mdl_t::numframes, model_t::numframes, daliasskingroup_t::numskins, mdl_t::numskins, model_t::numskins, mdl_t::numtris, mdl_t::numverts, model_t::PointSuperContents, r_fullbrights, r_mipskins, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_nolerp_list, R_SkinFrame_LoadExternal(), R_SkinFrame_LoadInternalQuake(), mdl_t::scale, mdl_t::scale_origin, mdl_t::skinheight, model_t::skinscenes, mdl_t::skinwidth, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, SUPERCONTENTS_SOLID, model_t::surfmesh, mdl_t::synctype, model_t::synctype, tempmempool, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, TEXF_PICMIP, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, daliasframetype_t::type, daliasskintype_t::type, model_t::type, mdl_t::version, and version.
Definition at line 1324 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmd2framesize6f, surfmesh_t::data_morphmdlvertex, model_t::data_surfaces, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, animscene_t::firstframe, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, MATERIALFLAG_WALL, MD2_SKINNAME, MD2ALIAS_VERSION, Mem_Alloc, Mem_Free, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadCustomMaterial(), Mod_LoadSkinFiles(), Mod_LoadTextureFromQ3Shader(), Mod_MakeCollisionBIH(), Mod_MDL_AnimateVertices(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, animscene_t::name, md2frame_t::name, model_t::name, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, md2_t::num_frames, surfmesh_t::num_morphframes, model_t::num_poses, md2_t::num_skins, md2_t::num_st, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, md2_t::num_tris, msurface_t::num_vertices, surfmesh_t::num_vertices, md2_t::num_xyz, model_t::numframes, model_t::numskins, md2_t::ofs_end, md2_t::ofs_frames, md2_t::ofs_glcmds, md2_t::ofs_skins, md2_t::ofs_st, md2_t::ofs_tris, model_t::PointSuperContents, r_mipskins, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_SkinFrame_LoadMissing(), md2frame_t::scale, md2_t::skinheight, model_t::skinscenes, md2_t::skinwidth, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, SUPERCONTENTS_SOLID, model_t::surfmesh, model_t::synctype, tempmempool, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, TEXF_PICMIP, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, md2frame_t::translate, model_t::type, v, md2_t::version, version, and xyz.
Definition at line 1578 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, buffer, model_t::collision_bih, model_t::CompileShadowMap, data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmd3vertex, model_t::data_surfaces, model_t::data_tags, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, model_t::effects, animscene_t::firstframe, md3modelheader_t::flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, md3mesh_t::identifier, md3modelheader_t::identifier, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, md3mesh_t::lump_elements, md3mesh_t::lump_end, md3modelheader_t::lump_frameinfo, md3mesh_t::lump_framevertices, md3modelheader_t::lump_meshes, md3mesh_t::lump_shaders, md3modelheader_t::lump_tags, md3mesh_t::lump_texcoords, aliastag_t::matrixgl, MD3VERSION, Mem_Alloc, Mem_AllocType, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MD3_AnimateVertices(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliastag_t::name, animscene_t::name, md3frameinfo_t::name, md3mesh_t::name, md3tag_t::name, model_t::name, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, md3mesh_t::num_frames, md3modelheader_t::num_frames, md3modelheader_t::num_meshes, surfmesh_t::num_morphframes, model_t::num_poses, md3mesh_t::num_shaders, model_t::num_surfaces, model_t::num_tagframes, md3modelheader_t::num_tags, model_t::num_tags, model_t::num_textures, model_t::num_texturesperskin, md3mesh_t::num_triangles, msurface_t::num_triangles, surfmesh_t::num_triangles, md3mesh_t::num_vertices, msurface_t::num_vertices, surfmesh_t::num_vertices, model_t::numframes, model_t::numskins, md3tag_t::origin, md3vertex_t::origin, md3vertex_t::pitch, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), md3tag_t::rotationmatrix, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, md3modelheader_t::version, version, and md3vertex_t::yaw.
Definition at line 378 of file model_sprite.c.
References model_t::animscenes, buffer, ca_dedicated, cls, CON_ERROR, Con_Printf(), model_t::data_textures, mspriteframe_t::down, dpsnprintf(), model_t::Draw, model_t::DrawDepth, model_t::DrawLight, animscene_t::firstframe, animscene_t::framecount, animscene_t::framerate, dsprite2_t::frames, dsprite2frame_t::height, height, Host_Error(), i, int(), cvar_t::integer, surfmesh_t::isanimated, mspriteframe_t::left, LittleLong, loadmodel, animscene_t::loop, max, MAX_QPATH, Mem_Alloc, model_t::mempool, mod_sprite, Mod_SpriteSetupTexture(), model_t::modeldatatypestring, animscene_t::name, dsprite2frame_t::name, model_t::name, model_t::normalmaxs, model_t::normalmins, NULL, model_t::num_textures, model_t::num_texturesperskin, dsprite2_t::numframes, model_t::numframes, origin, dsprite2frame_t::origin_x, dsprite2frame_t::origin_y, r_mipsprites, R_Model_Sprite_Draw(), R_SkinFrame_LoadExternal(), R_SkinFrame_LoadMissing(), model_t::radius, model_t::radius2, mspriteframe_t::right, model_t::rotatedmaxs, model_t::rotatedmins, SPR_VP_PARALLEL, model_sprite_t::sprdata_frames, model_t::sprite, SPRITE2_VERSION, model_sprite_t::sprnum_type, sqrt(), ST_SYNC, client_static_t::state, model_t::surfmesh, model_t::synctype, TEXF_ALPHA, TEXF_CLAMP, TEXF_COMPRESS, TEXF_ISSPRITE, TEXF_MIPMAP, TEXF_PICMIP, model_t::type, mspriteframe_t::up, dsprite2_t::version, version, dsprite2frame_t::width, width, x, y, model_t::yawmaxs, and model_t::yawmins.
Definition at line 267 of file model_sprite.c.
References model_t::animscenes, buffer, model_t::Draw, model_t::DrawDepth, model_t::DrawLight, animscene_t::framecount, Host_Error(), i, surfmesh_t::isanimated, LittleLong, loadmodel, mod_sprite, Mod_Sprite_SharedSetup(), model_t::modeldatatypestring, model_t::name, NULL, dsprite_t::numframes, dspritehl_t::numframes, model_t::numframes, R_Model_Sprite_Draw(), dspritehl_t::rendermode, SPRHL_ADDITIVE, SPRHL_ALPHATEST, SPRHL_INDEXALPHA, SPRHL_OPAQUE, model_t::sprite, SPRITE32_VERSION, SPRITE_VERSION, SPRITEHL_VERSION, model_sprite_t::sprnum_type, model_t::surfmesh, dsprite_t::synctype, dspritehl_t::synctype, model_t::synctype, dsprite_t::type, dspritehl_t::type, model_t::type, dsprite_t::version, dspritehl_t::version, and version.
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().
Definition at line 3219 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, surfmesh_t::blends, bound, buffer, iqmpose1_t::channelmask, iqmpose_t::channelmask, iqmpose1_t::channeloffset, iqmpose_t::channeloffset, iqmpose1_t::channelscale, iqmpose_t::channelscale, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), CrossProduct, data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), iqmheader_t::filesize, iqmanim_t::first_frame, iqmmesh_t::first_triangle, iqmmesh_t::first_vertex, animscene_t::firstframe, iqmanim_t::flags, iqmheader_t::flags, float, animscene_t::framecount, animscene_t::framerate, iqmanim_t::framerate, Host_Error(), i, iqmheader_t::id, blendweights_t::index, blendweights_t::influence, int(), cvar_t::integer, IQM_BLENDINDEXES, IQM_BLENDWEIGHTS, IQM_COLOR, IQM_FLOAT, IQM_LOOP, IQM_NORMAL, IQM_POSITION, IQM_TANGENT, IQM_TEXCOORD, IQM_UBYTE, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, iqmmesh_t::material, Matrix4x4_Concat(), Matrix4x4_FromArray12FloatD3D(), Matrix4x4_FromDoom3Joint(), Matrix4x4_Invert_Simple(), Matrix4x4_ToArray12FloatD3D(), max, maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, iqmbounds_t::mins, mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AddBlend(), Mod_Skeletal_AnimateVertices(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, iqmanim_t::name, iqmjoint1_t::name, iqmjoint_t::name, iqmmesh_t::name, model_t::name, model_t::normalmaxs, model_t::normalmins, NULL, iqmheader_t::num_anims, surfmesh_t::num_blends, model_t::num_bones, iqmheader_t::num_comment, iqmheader_t::num_extensions, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, iqmheader_t::num_framechannels, iqmanim_t::num_frames, iqmheader_t::num_frames, iqmheader_t::num_joints, iqmheader_t::num_meshes, model_t::num_poseinvscale, iqmheader_t::num_poses, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, iqmheader_t::num_text, model_t::num_textures, model_t::num_texturesperskin, iqmheader_t::num_triangles, iqmmesh_t::num_triangles, msurface_t::num_triangles, surfmesh_t::num_triangles, iqmheader_t::num_vertexarrays, iqmheader_t::num_vertexes, iqmmesh_t::num_vertexes, msurface_t::num_vertices, surfmesh_t::num_vertices, model_t::numframes, model_t::numskins, iqmheader_t::ofs_anims, iqmheader_t::ofs_bounds, iqmheader_t::ofs_comment, iqmheader_t::ofs_extensions, iqmheader_t::ofs_frames, iqmheader_t::ofs_joints, iqmheader_t::ofs_meshes, iqmheader_t::ofs_neighbors, iqmheader_t::ofs_poses, iqmheader_t::ofs_text, iqmheader_t::ofs_triangles, iqmheader_t::ofs_vertexarrays, iqmjoint1_t::origin, iqmjoint_t::origin, origin, aliasbone_t::parent, iqmjoint1_t::parent, iqmjoint_t::parent, iqmpose1_t::parent, iqmpose_t::parent, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, iqmjoint1_t::rotation, iqmjoint_t::rotation, iqmjoint1_t::scale, iqmjoint_t::scale, model_t::skinscenes, sqrt(), ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, va(), Vector4Negate, Vector4Normalize2, VectorClear, VectorCopy, iqmheader_t::version, model_t::yawmaxs, and model_t::yawmins.
void Mod_LoadCustomMaterial | ( | struct mempool_s * | mempool, |
texture_t * | texture, | ||
const char * | name, | ||
int | supercontents, | ||
int | materialflags, | ||
struct skinframe_s * | skinframe ) |
Sets up a material to render the provided skinframe. See also R_SkinFrame_LoadInternalBGRA.
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().
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 | ( | struct mempool_s * | mempool, |
const char * | modelname, | ||
texture_t * | texture, | ||
const char * | name, | ||
qbool | warnmissing, | ||
qbool | fallback, | ||
int | defaulttexflags, | ||
int | defaultmaterialflags ) |
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 7412 of file model_brush.c.
References texture_t::basematerialflags, BIH_BRUSH, BIH_Build(), BIH_COLLISIONTRIANGLE, BIH_RENDERTRIANGLE, q3mbrush_t::colbrushf, bih_leaf_t::itemindex, loadmodel, MATERIALFLAG_MESHCOLLISIONS, max, bih_t::maxnodes, bih_leaf_t::maxs, Mem_Alloc, Mem_Free, Mem_Realloc, model_t::mempool, min, bih_leaf_t::mins, model, bih_t::nodes, NULL, msurface_t::num_firstcollisiontriangle, msurface_t::num_firsttriangle, bih_t::numnodes, bih_leaf_t::surfaceindex, msurface_t::texture, q3mbrush_t::texture, bih_leaf_t::textureindex, bih_leaf_t::type, and VectorCopy.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_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 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 8399 of file model_brush.c.
References Host_Error().
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 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 4465 of file model_shared.c.
Referenced by CL_MeshEntities_Scene_Clear(), and DrawQ_FlushUI().
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 8417 of file model_brush.c.
References model_brush_t::AmbientSoundLevelsForPoint, mleaf_t::areaindex, argv(), model_brush_t::BoxTouchingLeafPVS, model_brush_t::BoxTouchingPVS, model_brush_t::BoxTouchingVisibleLeafs, model_t::brush, buffer, mleaf_t::clusterindex, mleaf_t::combinedsupercontents, model_t::CompileShadowMap, Con_DPrintf(), data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, model_brush_t::data_leafs, model_brush_t::data_leafsurfaces, model_brush_t::data_nodes, surfmesh_t::data_normal3f, model_brush_t::data_pvsclusters, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, fabs(), model_brush_t::FatPVS, model_brush_t::FindBoxClusters, model_brush_t::FindNonSolidLocation, animscene_t::firstframe, mleaf_t::firstleafbrush, mleaf_t::firstleafsurface, animscene_t::framecount, animscene_t::framerate, model_t::GetLightInfo, model_brush_t::GetPVS, i, int(), cvar_t::integer, model_brush_t::LightPoint, loadmodel, animscene_t::loop, max, MAX_QPATH, maxs, mleaf_t::maxs, msurface_t::maxs, Mem_Alloc, Mem_Free, Mem_Realloc, model_t::mempool, min, mins, mleaf_t::mins, msurface_t::mins, mod(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_BuildVBOs(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FindName(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), mod_obj, mod_obj_orientation, Mod_SetDrawSkyAndWater(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, model_t::name, name, model_brush_t::NativeContentsFromSuperContents, objvertex_t::nextindex, nobsp_pvs, model_t::normalmaxs, model_t::normalmins, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_brush_t::num_leafs, model_brush_t::num_leafsurfaces, model_brush_t::num_nodes, model_brush_t::num_portals, model_brush_t::num_pvsclusterbytes, model_brush_t::num_pvsclusters, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, model_brush_t::num_visleafs, mleaf_t::numleafbrushes, mleaf_t::numleafsurfaces, model_t::numskins, model_brush_t::numsubmodels, model_brush_t::PointInLeaf, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, model_brush_t::RoundUpToHullSize, model_t::skinscenes, model_t::soundfromcenter, sqrt(), objvertex_t::submodelindex, model_brush_t::submodels, model_brush_t::SuperContentsFromNativeContents, model_brush_t::supportwateralpha, model_t::surfmesh, tempmempool, msurface_t::texture, objvertex_t::textureindex, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TraceLineAgainstSurfaces, model_brush_t::TraceLineOfSight, model_t::TracePoint, model_t::type, objvertex_t::v, v, Vector2Compare, Vector2Copy, VectorClear, VectorCompare, VectorCopy, VectorLength2, objvertex_t::vn, objvertex_t::vt, model_t::yawmaxs, and model_t::yawmins.
Definition at line 2540 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, pskboneinfo_t::basepose, surfmesh_t::blends, pskrawweights_t::boneindex, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_DPrintf(), Con_Printf(), data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, developer_extra, dp_strlcat, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, fabs(), animscene_t::firstframe, pskaniminfo_t::firstframe, pskaniminfo_t::fps, animscene_t::framecount, animscene_t::framerate, pskanimkeys_t::frametime, FS_LoadFile(), FS_StripExtension(), pskface_t::group, Host_Error(), i, pskchunk_t::id, index, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, Matrix4x4_Concat(), Matrix4x4_FromOriginQuat(), Matrix4x4_Invert_Simple(), Matrix4x4_ToArray12FloatD3D(), pskface_t::mattindex, max, MAX_QPATH, Mem_Alloc, Mem_AllocType, Mem_Free, Mem_ReallocType, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_Skeletal_CompressBlend(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, model_t::name, pskaniminfo_t::name, pskboneinfo_t::name, pskmatt_t::name, NULL, surfmesh_t::num_blends, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, pskaniminfo_t::numbones, pskboneinfo_t::numchildren, model_t::numframes, pskaniminfo_t::numframes, pskchunk_t::numrecords, model_t::numskins, pskanimkeys_t::origin, pskpnts_t::origin, pskpose_t::origin, aliasbone_t::parent, pskboneinfo_t::parent, pskaniminfo_t::playtime, pskrawweights_t::pntsindex, pskvtxw_t::pntsindex, model_t::PointSuperContents, pskanimkeys_t::quat, pskpose_t::quat, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, pskchunk_t::recordsize, pskpose_t::size, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, tempmempool, pskvtxw_t::texcoord, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, pskpose_t::unknown, Vector4Copy, Vector4Negate, Vector4Normalize2, pskchunk_t::version, version, pskface_t::vtxwindex, and pskrawweights_t::weight.
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 3903 of file model_brush.c.
References model_t::brush, buffer, ca_dedicated, cls, Com_BlockChecksum(), Con_DPrintf(), Con_Printf(), CON_WARN, sizebuf_t::cursize, data, sizebuf_t::data, dp_strlcpy, dpsnprintf(), fabs(), hullinfo_t::filehulls, mmodel_t::firstface, HEADER_LUMPS, mmodel_t::headnode, Host_Error(), hullinfo_t::hullsizes, i, cvar_t::integer, msurface_t::lightmapinfo, LittleLong, loadmodel, LUMP_CLIPNODES, LUMP_EDGES, LUMP_ENTITIES, LUMP_FACES, LUMP_LEAFS, LUMP_LIGHTING, LUMP_MARKSURFACES, LUMP_MODELS, LUMP_NODES, LUMP_PLANES, LUMP_SURFEDGES, LUMP_TEXINFO, LUMP_TEXTURES, LUMP_VERTEXES, LUMP_VISIBILITY, max, MAX_MAP_HULLS, MAXLIGHTMAPS, mmodel_t::maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, mmodel_t::mins, mod(), mod_brushq1, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_LightPoint(), Mod_BSP_LoadNodes_RecursiveSetParent(), Mod_BSP_LoadSubmodels(), Mod_BSP_MakePortals(), Mod_BSP_PointInLeaf(), mod_bsp_portalize, Mod_BuildVBOs(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TraceLineAgainstSurfaces(), Mod_FindName(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_Q1BSP_AmbientSoundLevelsForPoint(), Mod_Q1BSP_AssignNoShadowSkySurfaces(), Mod_Q1BSP_CheckWaterAlphaSupport(), 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_LoadSurfedges(), Mod_Q1BSP_LoadTexinfo(), Mod_Q1BSP_LoadTextures(), Mod_Q1BSP_LoadVertexes(), Mod_Q1BSP_LoadVisibility(), Mod_Q1BSP_MakeHull0(), Mod_Q1BSP_NativeContentsFromSuperContents(), Mod_Q1BSP_PointSuperContents(), mod_q1bsp_polygoncollisions, Mod_Q1BSP_RoundUpToHullSize(), Mod_Q1BSP_SuperContentsFromNativeContents(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TraceLineOfSight(), Mod_Q1BSP_TracePoint(), Mod_SetDrawSkyAndWater(), MSG_InitReadBuffer(), MSG_ReadLittleLong(), model_t::name, name, NULL, model_brush_t::num_leafs, model_brush_t::num_nodes, model_brush_t::num_portals, model_t::num_surfaces, surfmesh_t::num_triangles, surfmesh_t::num_vertices, mmodel_t::numfaces, model_brush_t::numsubmodels, model_brush_lightstyleinfo_t::numsurfaces, offset, r, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), size, sqrt(), client_static_t::state, model_brush_lightstyleinfo_t::style, msurface_lightmapinfo_t::styles, model_brush_t::submodels, model_brush_t::supportwateralpha, model_brush_lightstyleinfo_t::surfacelist, model_t::surfmesh, model_brush_lightstyleinfo_t::value, VectorClear, VectorCopy, and VectorSet.
Referenced by Mod_2PSB_Load(), Mod_BSP2_Load(), and Mod_HLBSP_Load().
Definition at line 650 of file model_brush.c.
References CONTENTS_EMPTY, CONTENTS_LAVA, CONTENTS_SKY, CONTENTS_SLIME, CONTENTS_SOLID, CONTENTS_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_LAVA, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q1BSP_Load(), SV_CheckWater(), SV_CheckWaterTransition(), VM_CL_pointcontents(), and VM_SV_pointcontents().
Definition at line 630 of file model_brush.c.
References CONTENTS_EMPTY, CONTENTS_LAVA, CONTENTS_SKY, CONTENTS_SLIME, CONTENTS_SOLID, CONTENTS_WATER, SUPERCONTENTS_LAVA, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q1BSP_Load(), Mod_Q1BSP_PointSuperContents(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
Definition at line 4252 of file model_brush.c.
References CONTENTSQ2_DEADMONSTER, CONTENTSQ2_LAVA, CONTENTSQ2_MONSTER, CONTENTSQ2_MONSTERCLIP, CONTENTSQ2_PLAYERCLIP, CONTENTSQ2_SLIME, CONTENTSQ2_SOLID, CONTENTSQ2_TRANSLUCENT, CONTENTSQ2_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_CORPSE, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q2BSP_Load().
Definition at line 4228 of file model_brush.c.
References CONTENTSQ2_DEADMONSTER, CONTENTSQ2_LAVA, CONTENTSQ2_MONSTER, CONTENTSQ2_MONSTERCLIP, CONTENTSQ2_PLAYERCLIP, CONTENTSQ2_SLIME, CONTENTSQ2_SOLID, CONTENTSQ2_TRANSLUCENT, CONTENTSQ2_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_CORPSE, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_LoadTextureFromQ3Shader(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), and Mod_Q2BSP_LoadTexinfo().
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().
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 | ( | struct mempool_s * | mempool, |
int | maxverts, | ||
int | maxtriangles ) |
shadowmesh_t * Mod_ShadowMesh_Begin | ( | struct mempool_s * | mempool, |
int | maxverts, | ||
int | maxtriangles ) |
void Mod_ShadowMesh_CalcBBox | ( | shadowmesh_t * | firstmesh, |
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.
shadowmesh_t * Mod_ShadowMesh_Finish | ( | shadowmesh_t * | firstmesh, |
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 46 of file model_alias.c.
References Mem_Free, Mod_Skeletal_AnimateVertices_bonepose, Mod_Skeletal_AnimateVertices_maxbonepose, and NULL.
Referenced by mod_shutdown().
Definition at line 45 of file model_sprite.c.
References Cvar_RegisterVariable(), r_labelsprites_roundtopixels, r_labelsprites_scale, r_mipsprites, r_overheadsprites_perspective, r_overheadsprites_pushback, r_overheadsprites_scalex, r_overheadsprites_scaley, r_track_sprites, r_track_sprites_flags, r_track_sprites_scaleh, and r_track_sprites_scalew.
Referenced by Mod_Init().
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().
Definition at line 8312 of file model_brush.c.
References buffer, CF_CLIENT, CF_SERVER, sizebuf_t::cursize, Cvar_Get(), cvars_all, sizebuf_t::data, HL2HEADER_LUMPS, HL2LUMP_EDGES, HL2LUMP_ENTITIES, HL2LUMP_FACES, HL2LUMP_PLANES, HL2LUMP_SURFEDGES, HL2LUMP_TEXDATA, HL2LUMP_TEXINFO, HL2LUMP_VERTEXES, Host_Error(), i, cvar_t::integer, mod(), mod_brushhl2, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_PointInLeaf(), Mod_CollisionBIH_PointSuperContents(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint(), Mod_Q3BSP_LightPoint(), Mod_Q3BSP_NativeContentsFromSuperContents(), Mod_Q3BSP_SuperContentsFromNativeContents(), Mod_Q3BSP_TraceLineOfSight(), Mod_VBSP_LoadEdges(), Mod_VBSP_LoadEntities(), Mod_VBSP_LoadFaces(), Mod_VBSP_LoadPlanes(), Mod_VBSP_LoadSurfedges(), Mod_VBSP_LoadTexinfo(), Mod_VBSP_LoadTextures(), Mod_VBSP_LoadVertexes(), MSG_InitReadBuffer(), MSG_ReadLittleLong(), NULL, offset, R_AllocTexturePool(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), and size.
void Mod_VertexRangeFromElements | ( | int | numelements, |
const int * | elements, | ||
int * | firstvertexpointer, | ||
int * | lastvertexpointer ) |
Definition at line 2865 of file model_shared.c.
Definition at line 1768 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, BigFloat, BigLong, surfmesh_t::blends, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), count, data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), zymtype1header_t::filesize, animscene_t::firstframe, aliasbone_t::flags, flags, zymscene_t::flags, animscene_t::framecount, animscene_t::framerate, zymscene_t::framerate, Host_Error(), i, zymtype1header_t::id, int(), cvar_t::integer, surfmesh_t::isanimated, zymlump_t::length, zymscene_t::length, loadmodel, animscene_t::loop, zymtype1header_t::lump_bones, zymtype1header_t::lump_poses, zymtype1header_t::lump_render, zymtype1header_t::lump_scenes, zymtype1header_t::lump_shaders, zymtype1header_t::lump_texcoords, zymtype1header_t::lump_trizone, zymtype1header_t::lump_vertbonecounts, zymtype1header_t::lump_verts, Matrix4x4_FromArray12FloatD3D(), Matrix4x4_ToBonePose7s(), max, zymtype1header_t::maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, min, zymtype1header_t::mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildBaseBonePoses(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, model_t::name, zymbone_t::name, zymscene_t::name, model_t::normalmaxs, model_t::normalmins, NULL, surfmesh_t::num_blends, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, zymtype1header_t::numbones, model_t::numframes, zymtype1header_t::numscenes, zymtype1header_t::numshaders, model_t::numskins, zymtype1header_t::numtris, zymtype1header_t::numverts, origin, aliasbone_t::parent, model_t::PointSuperContents, R_ConcatTransforms(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, zymtype1header_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, model_t::skinscenes, sqrt(), ST_RAND, zymlump_t::start, zymscene_t::start, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, zymtype1header_t::type, VectorLength, VectorNormalize, model_t::yawmaxs, model_t::yawmins, Z_Free, Z_Malloc, and ZYMSCENEFLAG_NOLOOP.
void R_Mod_CompileShadowMap | ( | struct entity_render_s * | ent, |
vec3_t | relativelightorigin, | ||
vec3_t | relativelightdirection, | ||
float | lightradius, | ||
int | numsurfaces, | ||
const int * | surfacelist ) |
void R_Mod_Draw | ( | struct entity_render_s * | ent | ) |
void R_Mod_DrawAddWaterPlanes | ( | struct entity_render_s * | ent | ) |
void R_Mod_DrawDebug | ( | struct entity_render_s * | ent | ) |
void R_Mod_DrawDepth | ( | struct entity_render_s * | ent | ) |
void R_Mod_DrawLight | ( | struct entity_render_s * | ent, |
int | numsurfaces, | ||
const int * | surfacelist, | ||
const unsigned char * | trispvs ) |
void R_Mod_DrawPrepass | ( | struct entity_render_s * | ent | ) |
void R_Mod_DrawShadowMap | ( | int | side, |
struct entity_render_s * | ent, | ||
const vec3_t | relativelightorigin, | ||
const vec3_t | relativelightdirection, | ||
float | lightradius, | ||
int | modelnumsurfaces, | ||
const int * | modelsurfacelist, | ||
const unsigned char * | surfacesides, | ||
const vec3_t | lightmins, | ||
const vec3_t | lightmaxs ) |
void R_Mod_DrawSky | ( | struct entity_render_s * | ent | ) |
void R_Mod_GetLightInfo | ( | struct entity_render_s * | ent, |
vec3_t | relativelightorigin, | ||
float | lightradius, | ||
vec3_t | outmins, | ||
vec3_t | outmaxs, | ||
int * | outleaflist, | ||
unsigned char * | outleafpvs, | ||
int * | outnumleafspointer, | ||
int * | outsurfacelist, | ||
unsigned char * | outsurfacepvs, | ||
int * | outnumsurfacespointer, | ||
unsigned char * | outshadowtrispvs, | ||
unsigned char * | outlighttrispvs, | ||
unsigned char * | visitingleafpvs, | ||
int | numfrustumplanes, | ||
const mplane_t * | frustumplanes, | ||
qbool | noocclusion ) |
|
extern |
Definition at line 598 of file model_shared.h.
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().
|
extern |
|
extern |
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().
|
extern |
Definition at line 51 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_LoadCustomMaterial(), and Mod_LoadTextureFromQ3Shader().
|
extern |
Definition at line 50 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), and Mod_BrushInit().
|
extern |
Definition at line 48 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), Mod_BrushInit(), and Mod_Q3BSP_LoadLightGrid().
|
extern |
Definition at line 49 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), and Mod_BrushInit().
|
extern |
Definition at line 52 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 54 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 53 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 55 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 56 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 57 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_LoadTextureFromQ3Shader(), and Mod_Q1BSP_LoadTextures().
|
extern |
Definition at line 58 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 59 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
|
extern |
Definition at line 122 of file gl_rmain.c.
Referenced by GL_Main_Init(), Mod_IDP0_Load(), Mod_Q1BSP_LoadTextures(), and R_LoadQWSkin().
|
extern |
Definition at line 31 of file model_shared.c.
Referenced by Mod_Init(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), and R_SkinFrame_LoadInternalBGRA().
|
extern |
Definition at line 30 of file model_shared.c.
Referenced by Mod_BuildAliasSkinsFromSkinFiles(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_Init(), and R_LoadQWSkin().