]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - render.h
merged q1bsp and q3bsp surface rendering
[xonotic/darkplaces.git] / render.h
index 692f1ebf1ba45a9ce1c9a5028ad93263c918120a..85b927a0ea99b220f0e36f4c671b6ab1f9edd1f6 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;
@@ -168,6 +173,11 @@ extern cvar_t gl_dither;
 
 #include "r_light.h"
 
+extern rtexture_t *r_texture_blanknormalmap;
+extern rtexture_t *r_texture_white;
+extern rtexture_t *r_texture_black;
+extern rtexture_t *r_texture_notexture;
+
 void R_TimeReport(char *name);
 void R_TimeReport_Start(void);
 void R_TimeReport_End(void);