]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
fix some crashes with fogged surfaces
[xonotic/darkplaces.git] / model_shared.h
index c54046058b72eff260458f73cc1021f231dbcd33..9456dabf0db7012f1a6a4c9aa05887bfec3dffda 100644 (file)
@@ -73,7 +73,8 @@ typedef struct overridetagnameset_s
 }
 overridetagnameset_t;
 
-// LordHavoc: replaces glpoly, triangle mesh
+// used for mesh lists in q1bsp/q3bsp map models
+// (the surfaces reference portions of these meshes)
 typedef struct surfmesh_s
 {
        int num_triangles; // number of triangles in the mesh
@@ -461,10 +462,10 @@ extern char loadname[32]; // for hunk tags
 int Mod_BuildVertexRemapTableFromElements(int numelements, const int *elements, int numvertices, int *remapvertices);
 void Mod_BuildTriangleNeighbors(int *neighbors, const int *elements, int numtriangles);
 void Mod_ValidateElements(const int *elements, int numtriangles, int numverts, const char *filename, int fileline);
-void Mod_BuildNormals(int numverts, int numtriangles, const float *vertex3f, const int *elements, float *normal3f);
-void Mod_BuildTextureVectorsAndNormals(int numverts, int numtriangles, const float *vertex, const float *texcoord, const int *elements, float *svectors, float *tvectors, float *normals);
+void Mod_BuildNormals(int firstvertex, int numvertices, int numtriangles, const float *vertex3f, const int *elements, float *normal3f);
+void Mod_BuildTextureVectorsAndNormals(int firstvertex, int numvertices, int numtriangles, const float *vertex, const float *texcoord, const int *elements, float *svectors, float *tvectors, float *normals);
 
-surfmesh_t *Mod_AllocSurfMesh(mempool_t *mempool, int numvertices, int numtriangles, qboolean detailtexcoords, qboolean lightmapoffsets, qboolean vertexcolors);
+surfmesh_t *Mod_AllocSurfMesh(mempool_t *mempool, int numvertices, int numtriangles, qboolean detailtexcoords, qboolean lightmapoffsets, qboolean vertexcolors, qboolean neighbors);
 
 shadowmesh_t *Mod_ShadowMesh_Alloc(mempool_t *mempool, int maxverts, int maxtriangles, rtexture_t *map_diffuse, rtexture_t *map_specular, rtexture_t *map_normal, int light, int neighbors, int expandable);
 shadowmesh_t *Mod_ShadowMesh_ReAlloc(mempool_t *mempool, shadowmesh_t *oldmesh, int light, int neighbors);