]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.h
fix gl_combine 0 crashes (it was indexing the color vector as if it was a vertex...
[xonotic/darkplaces.git] / model_brush.h
index 6484ccf8533825cad4954a5dff5d221b62bbb4be..0f2aadee76395977c8175c051532d4d3123e2102 100644 (file)
@@ -148,25 +148,8 @@ typedef struct
 }
 mtexinfo_t;
 
-struct q3deffect_s;
-typedef struct msurface_s
+typedef struct msurface_lightmapinfo_s
 {
-       // bounding box for onscreen checks
-       vec3_t mins;
-       vec3_t maxs;
-       // the texture to use on the surface
-       texture_t *texture;
-       // the lightmap texture fragment to use on the rendering mesh
-       rtexture_t *lightmaptexture;
-       // mesh for rendering
-       surfmesh_t mesh;
-       // index into model->brush.shadowmesh
-       int num_firstshadowmeshtriangle;
-
-       // the node plane this is on, backwards if SURF_PLANEBACK flag set
-       //mplane_t *plane; // q1bsp
-       // SURF_ flags
-       //int flags; // q1bsp
        // texture mapping properties used by this surface
        mtexinfo_t *texinfo; // q1bsp
        // index into d_lightstylevalue array, 255 means not used (black)
@@ -179,14 +162,39 @@ typedef struct msurface_s
        int lightmaptexturestride; // q1bsp
        int texturemins[2]; // q1bsp
        int extents[2]; // q1bsp
-       // if lightmap settings changed, this forces update
-       int cached_dlight; // q1bsp
-       // if this == r_framecount there are dynamic lights on the surface
-       int dlightframe; // q1bsp
-       // which dynamic lights are touching this surface
-       // (only access this if dlightframe is current)
-       int dlightbits[8]; // q1bsp
+}
+msurface_lightmapinfo_t;
 
+struct q3deffect_s;
+typedef struct msurface_s
+{
+       // bounding box for onscreen checks
+       vec3_t mins;
+       vec3_t maxs;
+       // the texture to use on the surface
+       texture_t *texture;
+       // the lightmap texture fragment to use on the rendering mesh
+       rtexture_t *lightmaptexture;
+
+       // this surface is part of this mesh
+       surfmesh_t *groupmesh;
+       int num_triangles; // number of triangles in the mesh
+       int num_firsttriangle; // first triangle in the mesh (index into groupmesh)
+       int num_vertices; // number of vertices in the mesh
+       int num_firstvertex; // first vertex in the mesh (index into groupmesh)
+
+       // shadow volume building information
+       int num_firstshadowmeshtriangle; // index into model->brush.shadowmesh
+
+       // lightmaptexture rebuild information not used in q3bsp
+       int cached_dlight; // q1bsp // forces rebuild of lightmaptexture
+       msurface_lightmapinfo_t *lightmapinfo; // q1bsp
+
+       // mesh information for collisions (only used by q3bsp curves)
+       int num_collisiontriangles; // q3bsp
+       int *data_collisionelement3i; // q3bsp
+       int num_collisionvertices; // q3bsp
+       float *data_collisionvertex3f; // q3bsp
        struct q3deffect_s *effect; // q3bsp
        // FIXME: collisionmarkframe should be kept in a separate array
        int collisionmarkframe; // q3bsp // don't collide twice in one trace
@@ -307,9 +315,6 @@ typedef struct mlight_s
 }
 mlight_t;
 
-extern rtexture_t *r_notexture;
-extern texture_t r_notexture_mip;
-
 struct model_s;
 void Mod_Q1BSP_Load(struct model_s *mod, void *buffer);
 void Mod_IBSP_Load(struct model_s *mod, void *buffer);