int (*BoxTouchingPVS)(struct model_s *model, const qbyte *pvs, const vec3_t mins, const vec3_t maxs);
void (*LightPoint)(struct model_s *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal);
void (*FindNonSolidLocation)(struct model_s *model, const vec3_t in, vec3_t out, vec_t radius);
- void (*TraceBox)(struct model_s *model, struct trace_s *trace, const vec3_t boxstartmins, const vec3_t boxstartmaxs, const vec3_t boxendmins, const vec3_t boxendmaxs, int hitsupercontentsmask);
// these are actually only found on brushq1, but NULL is handled gracefully
void (*AmbientSoundLevelsForPoint)(struct model_s *model, const vec3_t p, qbyte *out, int outsize);
void (*RoundUpToHullSize)(struct model_s *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs);
int *surfacepvsframes;
msurface_t *surfacepvsnext;
surfmesh_t *entiremesh;
- surfmesh_t *surfmeshes;
int numsurfedges;
int *surfedges;
*/
#define Q3MTEXTURERENDERFLAGS_NODRAW 1
+#define Q3MTEXTURERENDERFLAGS_SKY 2
typedef struct q3mtexture_s
{
int collisionmarkframe; // don't collide twice in one trace
int type;
int firstvertex;
- int numvertices;
int firstelement;
- int numelements;
int patchsize[2];
// used for processing
int markframe;
float mins[3];
float maxs[3];
+ int num_vertices;
+ int num_triangles;
float *data_vertex3f;
float *data_texcoordtexture2f;
float *data_texcoordlightmap2f;
float *data_tvector3f;
float *data_normal3f;
float *data_color4f;
- int numtriangles;
int *data_element3i;
int *data_neighbor3i;
}
void(*DrawSky)(struct entity_render_s *ent);
// draw the model using lightmap/dlight shading
void(*Draw)(struct entity_render_s *ent);
- // draw a fake shadow for the model
- void(*DrawFakeShadow)(struct entity_render_s *ent);
// draw a shadow volume for the model based on light source
void(*DrawShadowVolume)(struct entity_render_s *ent, vec3_t relativelightorigin, float lightradius);
// draw the lighting on a model (through stencil)
void(*DrawLight)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltofilter, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz);
+ // trace a box against this model
+ void (*TraceBox)(struct model_s *model, int frame, struct trace_s *trace, const vec3_t boxstartmins, const vec3_t boxstartmaxs, const vec3_t boxendmins, const vec3_t boxendmaxs, int hitsupercontentsmask);
// fields belonging to each type of model
model_alias_t alias;
model_sprite_t sprite;
model_brushq3_t brushq3;
// skin files can have different tags for each skin
overridetagnameset_t *data_overridetagnamesforskin;
+ // flags this model for offseting sounds to the model center (used by brush models)
+ int soundfromcenter;
}
model_t;
// every texture must be in a pool...
extern rtexturepool_t *mod_shared_texturepool;
-extern rtexture_t *mod_shared_distorttexture;
+extern rtexture_t *mod_shared_distorttexture[64];
// model loading
extern model_t *loadmodel;