-typedef struct r_view_s
-{
- // view information (changes multiple times per frame)
- // if any of these variables change then r_viewcache must be regenerated
- // by calling R_View_Update
- // (which also updates viewport, scissor, colormask)
-
- // it is safe and expected to copy this into a structure on the stack and
- // call the renderer recursively, then restore from the stack afterward
- // (as long as R_View_Update is called)
-
- // eye position information
- matrix4x4_t matrix;
- vec3_t origin;
- vec3_t forward;
- vec3_t left;
- vec3_t right;
- vec3_t up;
- mplane_t frustum[5];
- float frustum_x, frustum_y;
-
- // screen area to render in
- int x;
- int y;
- int z;
- int width;
- int height;
- int depth;
-
- // which color components to allow (for anaglyph glasses)
- int colormask[4];
-}
-r_view_t;
-
-typedef struct r_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.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.worldmodel->brush.num_clusters
- unsigned char world_pvsbits[(32768+7)>>3];
- // TODO: dynamic resize according to r_refdef.worldmodel->brush.num_leafs
- unsigned char world_leafvisible[32768];
- // TODO: dynamic resize according to r_refdef.worldmodel->num_surfaces
- unsigned char world_surfacevisible[262144];
- // if true, the view is currently in a leaf without pvs data
- qboolean world_novis;
-}
-r_viewcache_t;
-