]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
recalculate farclip immediately before rendering, instead of from the previous frame...
[xonotic/darkplaces.git] / model_shared.h
index e1d63e99a4a67e183103787bf4072cf5381f9a43..00a11b2815340d17c7e74bc5061af8562e40d1e6 100644 (file)
@@ -279,33 +279,54 @@ typedef struct model_brushq2_s
 model_brushq2_t;
 */
 
-
-#define SURFACEPARM_ALPHASHADOW 1
-#define SURFACEPARM_AREAPORTAL 2
-#define SURFACEPARM_CLUSTERPORTAL 4
-#define SURFACEPARM_DETAIL 8
-#define SURFACEPARM_DONOTENTER 16
-#define SURFACEPARM_FOG 32
-#define SURFACEPARM_LAVA 64
-#define SURFACEPARM_LIGHTFILTER 128
-#define SURFACEPARM_METALSTEPS 256
-#define SURFACEPARM_NODAMAGE 512
-#define SURFACEPARM_NODLIGHT 1024
-#define SURFACEPARM_NODRAW 2048
-#define SURFACEPARM_NODROP 4096
-#define SURFACEPARM_NOIMPACT 8192
-#define SURFACEPARM_NOLIGHTMAP 16384
-#define SURFACEPARM_NOMARKS 32768
-#define SURFACEPARM_NOMIPMAPS 65536
-#define SURFACEPARM_NONSOLID 131072
-#define SURFACEPARM_ORIGIN 262144
-#define SURFACEPARM_PLAYERCLIP 524288
-#define SURFACEPARM_SKY 1048576
-#define SURFACEPARM_SLICK 2197152
-#define SURFACEPARM_SLIME 4194304
-#define SURFACEPARM_STRUCTURAL 8388608
-#define SURFACEPARM_TRANS 16777216
-#define SURFACEPARM_WATER 33554432
+// surfaceflags from bsp
+#define Q3SURFACEFLAG_NODAMAGE 1
+#define Q3SURFACEFLAG_SLICK 2
+#define Q3SURFACEFLAG_SKY 4
+#define Q3SURFACEFLAG_LADDER 8
+#define Q3SURFACEFLAG_NOIMPACT 16
+#define Q3SURFACEFLAG_NOMARKS 32
+#define Q3SURFACEFLAG_FLESH 64
+#define Q3SURFACEFLAG_NODRAW 128
+#define Q3SURFACEFLAG_HINT 256
+#define Q3SURFACEFLAG_SKIP 512
+#define Q3SURFACEFLAG_NOLIGHTMAP 1024
+#define Q3SURFACEFLAG_POINTLIGHT 2048
+#define Q3SURFACEFLAG_METALSTEPS 4096
+#define Q3SURFACEFLAG_NOSTEPS 8192
+#define Q3SURFACEFLAG_NONSOLID 16384
+#define Q3SURFACEFLAG_LIGHTFILTER 32768
+#define Q3SURFACEFLAG_ALPHASHADOW 65536
+#define Q3SURFACEFLAG_NODLIGHT 131072
+#define Q3SURFACEFLAG_DUST 262144
+
+// surfaceparms from shaders
+#define Q3SURFACEPARM_ALPHASHADOW 1
+#define Q3SURFACEPARM_AREAPORTAL 2
+#define Q3SURFACEPARM_CLUSTERPORTAL 4
+#define Q3SURFACEPARM_DETAIL 8
+#define Q3SURFACEPARM_DONOTENTER 16
+#define Q3SURFACEPARM_FOG 32
+#define Q3SURFACEPARM_LAVA 64
+#define Q3SURFACEPARM_LIGHTFILTER 128
+#define Q3SURFACEPARM_METALSTEPS 256
+#define Q3SURFACEPARM_NODAMAGE 512
+#define Q3SURFACEPARM_NODLIGHT 1024
+#define Q3SURFACEPARM_NODRAW 2048
+#define Q3SURFACEPARM_NODROP 4096
+#define Q3SURFACEPARM_NOIMPACT 8192
+#define Q3SURFACEPARM_NOLIGHTMAP 16384
+#define Q3SURFACEPARM_NOMARKS 32768
+#define Q3SURFACEPARM_NOMIPMAPS 65536
+#define Q3SURFACEPARM_NONSOLID 131072
+#define Q3SURFACEPARM_ORIGIN 262144
+#define Q3SURFACEPARM_PLAYERCLIP 524288
+#define Q3SURFACEPARM_SKY 1048576
+#define Q3SURFACEPARM_SLICK 2197152
+#define Q3SURFACEPARM_SLIME 4194304
+#define Q3SURFACEPARM_STRUCTURAL 8388608
+#define Q3SURFACEPARM_TRANS 16777216
+#define Q3SURFACEPARM_WATER 33554432
 
 typedef struct q3mtexture_s
 {
@@ -323,12 +344,11 @@ q3mtexture_t;
 typedef struct q3mnode_s
 {
        //this part shared between node and leaf
-       int isnode; // true
+       struct mplane_s *plane; // != NULL
        struct q3mnode_s *parent;
        vec3_t mins;
        vec3_t maxs;
        // this part unique to nodes
-       struct mplane_s *plane;
        struct q3mnode_s *children[2];
 }
 q3mnode_t;
@@ -336,7 +356,7 @@ q3mnode_t;
 typedef struct q3mleaf_s
 {
        //this part shared between node and leaf
-       int isnode; // false
+       struct mplane_s *plane; // == NULL
        struct q3mnode_s *parent;
        vec3_t mins;
        vec3_t maxs;