]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.h
fixed GL_Scissor call in rtlight code (apparently I need to feed it a top to bottom...
[xonotic/darkplaces.git] / model_brush.h
index 537b6c63124aa625ca7ddaed41f97f4616eedcab..f812fdb8c61cf7e89b7976b8d511fcafefe533d6 100644 (file)
@@ -240,8 +240,8 @@ typedef struct mnode_s
        vec3_t mins;
        vec3_t maxs;
 
+       mplane_t *plane; // != NULL
 // node specific
-       mplane_t *plane;
        struct mnode_s *children[2];
 
        unsigned short firstsurface;
@@ -262,6 +262,7 @@ typedef struct mleaf_s
        vec3_t mins;
        vec3_t maxs;
 
+       mplane_t *plane; // == NULL
 // leaf specific
        // next leaf in pvschain
        struct mleaf_s *pvschain;
@@ -274,9 +275,8 @@ typedef struct mleaf_s
        // used by polygon-through-portals visibility checker
        int portalmarkid;
 
-       // decompressed pvs bits (potentially visible set)
-       // note: never NULL, always present, may be full of 0xFF though
-       qbyte *pvsdata;
+       // -1 is not in pvs, >= 0 is pvs bit number
+       int clusterindex;
 
        int *firstmarksurface;
        int nummarksurfaces;
@@ -766,5 +766,8 @@ typedef struct
 }
 q3dpvs_t;
 
+#define CHECKPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] & (1 << ((b) & 7))) : false)
+#define SETPVSBIT(pvs,b) ((b) >= 0 ? ((pvs)[(b) >> 3] |= (1 << ((b) & 7))) : false)
+
 #endif