+ // whether to call R_ClearScreen before rendering stuff
+ qboolean clear;
+ // if true, don't clear or do any post process effects (bloom, etc)
+ qboolean isoverlay;
+
+ // whether to draw r_showtris and such, this is only true for the main
+ // view render, all secondary renders (HDR, mirrors, portals, cameras,
+ // distortion effects, etc) omit such debugging information
+ qboolean showdebug;
+
+ // these define which values to use in GL_CullFace calls to request frontface or backface culling
+ int cullface_front;
+ int cullface_back;
+
+ // render quality (0 to 1) - affects r_drawparticles_drawdistance and others
+ float quality;
+}
+r_refdef_view_t;
+
+typedef struct r_refdef_viewcache_s
+{
+ // these properties are generated by R_View_Update()
+
+ // which entities are currently visible for this viewpoint
+ // (the used range is 0...r_refdef.scene.numentities)
+ unsigned char entityvisible[MAX_EDICTS];
+ // 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.scene.worldmodel->brush.num_clusters
+ unsigned char world_pvsbits[(32768+7)>>3]; // FIXME: buffer overflow on huge maps
+ // TODO: dynamic resize according to r_refdef.scene.worldmodel->brush.num_leafs
+ unsigned char world_leafvisible[32768]; // FIXME: buffer overflow on huge maps
+ // TODO: dynamic resize according to r_refdef.scene.worldmodel->num_surfaces
+ unsigned char world_surfacevisible[262144]; // FIXME: buffer overflow on huge maps
+ // if true, the view is currently in a leaf without pvs data
+ qboolean world_novis;
+}
+r_refdef_viewcache_t;
+
+// TODO: really think about which fields should go into scene and which one should stay in refdef [1/7/2008 Black]
+// maybe also refactor some of the functions to support different setting sources (ie. fogenabled, etc.) for different scenes
+typedef struct r_refdef_scene_s {