+extern vec3_t r_vieworigin;
+extern vec3_t r_viewforward;
+extern vec3_t r_viewleft;
+extern vec3_t r_viewright;
+extern vec3_t r_viewup;
+extern int r_view_x;
+extern int r_view_y;
+extern int r_view_z;
+extern int r_view_width;
+extern int r_view_height;
+extern int r_view_depth;
+extern float r_view_fov_x;
+extern float r_view_fov_y;
+extern matrix4x4_t r_view_matrix;
+
+extern mleaf_t *r_viewleaf, *r_oldviewleaf;
+extern unsigned short d_lightstylevalue[256]; // 8.8 fraction of base light value
+
+extern qboolean envmap;
+
+extern cvar_t r_drawentities;
+extern cvar_t r_drawviewmodel;
+extern cvar_t r_speeds;
+extern cvar_t r_fullbright;
+extern cvar_t r_wateralpha;
+extern cvar_t r_dynamic;
+extern cvar_t r_drawcollisionbrushes;
+
+void R_Init(void);
+void R_UpdateWorld(void); // needs no r_refdef
+void R_RenderView(void); // must call R_UpdateWorld and set r_refdef first
+
+
+void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
+
+void R_WorldVisibility();
+void R_DrawParticles(void);
+void R_DrawExplosions(void);
+
+#define gl_solid_format 3
+#define gl_alpha_format 4
+
+int R_CullBox(const vec3_t mins, const vec3_t maxs);
+
+extern qboolean fogenabled;
+extern vec3_t fogcolor;
+extern vec_t fogdensity;
+#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_vieworigin[0])*((v)[0] - r_vieworigin[0])+((v)[1] - r_vieworigin[1])*((v)[1] - r_vieworigin[1])+((v)[2] - r_vieworigin[2])*((v)[2] - r_vieworigin[2])))))
+#define calcfogbyte(v) ((qbyte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
+
+#include "r_modules.h"
+
+#include "meshqueue.h"
+
+#include "r_lerpanim.h"