]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.h
Elric rewrote the makefile, it is quite self explanatory when run.
[xonotic/darkplaces.git] / model_brush.h
index 8424b538566f2004b97559b73f074226fe8916ee..e928269894be7f585f5c86792db4e76ad598a096 100644 (file)
@@ -120,6 +120,8 @@ texture_t;
 #define SURF_DRAWFULLBRIGHT 0x200
 #define SURF_LIGHTBOTHSIDES 0x400
 #define SURF_CLIPSOLID 0x800 // this polygon can obscure other polygons
+#define SURF_SHADOWCAST 0x1000 // this polygon can cast stencil shadows
+#define SURF_SHADOWLIGHT 0x2000 // this polygon can be lit by stencil shadowing
 
 typedef struct
 {
@@ -145,9 +147,9 @@ typedef struct surfmesh_s
        float *verts;
        float *normals;
        int *lightmapoffsets;
-       float *st;
-       float *uv;
-       float *ab;
+       float *str;
+       float *uvw;
+       float *abc;
        int *index;
        int *triangleneighbors;
 }
@@ -301,14 +303,15 @@ typedef struct mportal_s
 }
 mportal_t;
 
-typedef struct mlightshadowvolumemesh_s
+typedef struct svbspmesh_s
 {
-       struct mlightshadowvolumemesh_s *next;
-       int numverts;
-       int numtris;
-       float *vertex;
+       struct svbspmesh_s *next;
+       int numverts, maxverts;
+       int numtriangles, maxtriangles;
+       float *verts;
+       int *elements;
 }
-mlightshadowvolumemesh_t;
+svbspmesh_t;
 
 typedef struct mlight_s
 {
@@ -334,10 +337,12 @@ typedef struct mlight_s
        // surfaces this shines on
        int numsurfaces;
        msurface_t **surfaces;
+       // lit area
+       vec3_t mins, maxs;
        // precomputed shadow volume meshs
-       mlightshadowvolumemesh_t *shadowvolumemeshs;
-       // used only for loading calculations, number of leafs this shines on
-       //int numleafs;
+       //svbspmesh_t *shadowvolume;
+       //vec3_t shadowvolumemins, shadowvolumemaxs;
+       shadowmesh_t *shadowvolume;
 }
 mlight_t;