#ifndef RENDER_H
#define RENDER_H
+extern qbyte r_pvsbits[(MAX_MAP_LEAFS+7)>>3];
+
extern matrix4x4_t r_identitymatrix;
// 1.0f / N table
// detail texture stuff
extern cvar_t r_detailtextures;
+extern cvar_t r_lerpsprites;
+extern cvar_t r_lerpmodels;
+extern cvar_t r_waterscroll;
+extern cvar_t r_watershader;
+
// useful functions for rendering
void R_ModulateColors(float *in, float *out, int verts, float r, float g, float b);
void R_FillColors(float *out, int verts, float r, float g, float b, float a);
//
// view origin
//
-extern vec3_t vup;
-extern vec3_t vpn;
-extern vec3_t vright;
-extern vec3_t r_origin;
+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 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_dlightmap;
+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_RenderView (void); // must set r_refdef first
void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
-void R_NewMap (void);
-
void R_WorldVisibility(entity_render_t *ent);
void R_DrawWorld(entity_render_t *ent);
void R_DrawParticles(void);
void R_DrawExplosions(void);
-// LordHavoc: vertex transform
-#include "transform.h"
-
#define gl_solid_format 3
#define gl_alpha_format 4
//#define PARANOID 1
int R_CullBox(const vec3_t mins, const vec3_t maxs);
-int PVS_CullBox(const vec3_t mins, const vec3_t maxs);
-int R_CullSphere(const vec3_t origin, vec_t radius);
-int PVS_CullSphere(const vec3_t origin, vec_t radius);
extern qboolean fogenabled;
extern vec3_t fogcolor;
extern vec_t fogdensity;
-#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0])*((v)[0] - r_origin[0])+((v)[1] - r_origin[1])*((v)[1] - r_origin[1])+((v)[2] - r_origin[2])*((v)[2] - r_origin[2])))))
+#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)))
// start a farclip measuring session
#include "meshqueue.h"
-extern float overbrightscale;
-
#include "r_lerpanim.h"
extern cvar_t r_render;
void R_TimeReport_End(void);
// r_stain
-void R_Stain (const vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2);
+void R_Stain(const vec3_t origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2);
void R_DrawWorldCrosshair(void);
void R_Draw2DCrosshair(void);
-void R_CalcBeamVerts (float *vert, const vec3_t org1, const vec3_t org2, float width);
+void R_CalcBeam_Vertex3f(float *vert, const vec3_t org1, const vec3_t org2, float width);
+void R_DrawSprite(int blendfunc1, int blendfunc2, rtexture_t *texture, int depthdisable, const vec3_t origin, const vec3_t left, const vec3_t up, float scalex1, float scalex2, float scaley1, float scaley2, float cr, float cg, float cb, float ca);
#endif