Added r_farclip to control the far clipping plane.

This commit is contained in:
Brian Koropoff 2002-05-20 05:11:12 +00:00
parent 347962cc33
commit ee5d0b7a99
3 changed files with 5 additions and 1 deletions

View file

@ -55,6 +55,7 @@ extern struct cvar_s *r_drawviewmodel;
extern struct cvar_s *r_dspeeds; extern struct cvar_s *r_dspeeds;
extern struct cvar_s *r_dynamic; extern struct cvar_s *r_dynamic;
extern struct cvar_s *r_explosionclip; extern struct cvar_s *r_explosionclip;
extern struct cvar_s *r_farclip;
extern struct cvar_s *r_firecolor; extern struct cvar_s *r_firecolor;
extern struct cvar_s *r_fullbright; extern struct cvar_s *r_fullbright;
extern struct cvar_s *r_graphheight; extern struct cvar_s *r_graphheight;

View file

@ -353,7 +353,7 @@ R_SetupGL (void)
qfglViewport (glx + x, gly + y2, w, h); qfglViewport (glx + x, gly + y2, w, h);
screenaspect = (float) r_refdef.vrect.width / r_refdef.vrect.height; screenaspect = (float) r_refdef.vrect.width / r_refdef.vrect.height;
MYgluPerspective (r_refdef.fov_y, screenaspect, 4, 4096); MYgluPerspective (r_refdef.fov_y, screenaspect, 4, r_farclip->value);
if (mirror) { if (mirror) {
if (mirror_plane->normal[2]) if (mirror_plane->normal[2])

View file

@ -94,6 +94,7 @@ cvar_t *r_drawviewmodel;
cvar_t *r_dspeeds; cvar_t *r_dspeeds;
cvar_t *r_dynamic; cvar_t *r_dynamic;
cvar_t *r_explosionclip; cvar_t *r_explosionclip;
cvar_t *r_farclip;
cvar_t *r_firecolor; cvar_t *r_firecolor;
cvar_t *r_graphheight; cvar_t *r_graphheight;
cvar_t *r_lightmap_components; cvar_t *r_lightmap_components;
@ -269,6 +270,8 @@ R_Init_Cvars (void)
"Set to 0 to disable lightmap changes"); "Set to 0 to disable lightmap changes");
r_explosionclip = Cvar_Get ("r_explosionclip", "0", CVAR_ARCHIVE, NULL, r_explosionclip = Cvar_Get ("r_explosionclip", "0", CVAR_ARCHIVE, NULL,
"Clip explosions."); "Clip explosions.");
r_farclip = Cvar_Get ("r_farclip", "4096", CVAR_ARCHIVE, NULL,
"Distance of the far clipping plane from the player.");
r_firecolor = Cvar_Get ("r_firecolor", "0.9 0.4 0", CVAR_ARCHIVE, NULL, r_firecolor = Cvar_Get ("r_firecolor", "0.9 0.4 0", CVAR_ARCHIVE, NULL,
"color of rocket and lava ball fires"); "color of rocket and lava ball fires");
r_graphheight = Cvar_Get ("r_graphheight", "32", CVAR_NONE, NULL, r_graphheight = Cvar_Get ("r_graphheight", "32", CVAR_NONE, NULL,