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
{
struct q3mtexture_s *texture;
struct q3meffect_s *effect;
rtexture_t *lightmaptexture;
+ int collisions; // performs per triangle collisions on this surface
+ 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;
+ // (world only) visframe == r_framecount means it is visible this frame
+ int visframe;
+ // bounding box for culling
+ 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)
// every texture must be in a pool...
extern rtexturepool_t *mod_shared_texturepool;
+extern rtexture_t *mod_shared_distorttexture;
+
// model loading
extern model_t *loadmodel;
extern qbyte *mod_base;
void Mod_FreeSkinFiles(skinfile_t *skinfile);
int Mod_CountSkinFiles(skinfile_t *skinfile);
+int Mod_RemoveDegenerateTriangles(int numtriangles, const int *inelement3i, int *outelement3i, const float *vertex3f);
+
#endif // __MODEL__