]> 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 56f34e33e9c9056d9da5cd9b6a5cb7e4f849abb3..0f2aadee76395977c8175c051532d4d3123e2102 100644 (file)
@@ -148,27 +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;
-       // if lightmap settings changed, this forces update
-       int cached_dlight; // q1bsp
-       // 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)
@@ -181,7 +162,39 @@ typedef struct msurface_s
        int lightmaptexturestride; // q1bsp
        int texturemins[2]; // q1bsp
        int extents[2]; // 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