]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - render.h
cl_capturevideo_raw* modes now use O_NONBLOCKING file access for more performance
[xonotic/darkplaces.git] / render.h
index 692f1ebf1ba45a9ce1c9a5028ad93263c918120a..80f1a2b24f48c6e81960fd733611c146e50e9055 100644 (file)
--- a/render.h
+++ b/render.h
@@ -21,8 +21,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #ifndef RENDER_H
 #define RENDER_H
 
-extern qbyte r_pvsbits[(MAX_MAP_LEAFS+7)>>3];
-extern qbyte r_worldsurfacevisible[MAX_MAP_LEAFS];
+// flag arrays used for visibility checking on world model
+// (all other entities have no per-surface/per-leaf visibility checks)
+// TODO: dynamic resize according to r_refdef.worldmodel->brush.num_clusters
+qbyte r_pvsbits[(32768+7)>>3];
+// TODO: dynamic resize according to r_refdef.worldmodel->brush.num_leafs
+qbyte r_worldleafvisible[32768];
+// TODO: dynamic resize according to r_refdef.worldmodel->brush.num_surfaces
+qbyte r_worldsurfacevisible[262144];
 
 extern matrix4x4_t r_identitymatrix;
 
@@ -143,7 +149,6 @@ void R_DrawExplosions(void);
 #define gl_alpha_format 4
 
 int R_CullBox(const vec3_t mins, const vec3_t maxs);
-#define VIS_CullBox(mins,maxs) (R_CullBox((mins), (maxs)) || (r_refdef.worldmodel && r_refdef.worldmodel->brush.BoxTouchingPVS && !r_refdef.worldmodel->brush.BoxTouchingPVS(r_refdef.worldmodel, r_pvsbits, (mins), (maxs))))
 
 extern qboolean fogenabled;
 extern vec3_t fogcolor;