add gl_skymultipass to conroll whether the skydome is single or double pass.

Currently defaults to 1 (multipass, ie old behaviour).
This commit is contained in:
Bill Currie 2000-07-30 02:54:17 +00:00
parent b0f20f955c
commit 92baf1a751
4 changed files with 13 additions and 7 deletions

View file

@ -225,6 +225,7 @@ extern cvar_t *gl_max_size;
extern cvar_t *gl_playermip;
extern cvar_t *r_skyname;
extern cvar_t *gl_skymultipass;
extern int mirrortexturenum; // quake texturenum, not gltexturenum
extern qboolean mirror;

View file

@ -122,6 +122,7 @@ cvar_t *gl_reporttjunctions;
cvar_t *gl_particles;
cvar_t *r_skyname;
cvar_t *gl_skymultipass;
extern cvar_t *scr_fov;

View file

@ -272,6 +272,8 @@ void R_Init (void)
r_skyname = Cvar_Get("r_skyname", "none", CVAR_NONE,
"name of the current skybox");
gl_skymultipass = Cvar_Get("gl_skymultipass", "1", CVAR_NONE,
"controls wether the skydome is single or double pass");
R_InitBubble();

View file

@ -754,13 +754,15 @@ R_DrawSkyDome (void)
glEnable (GL_BLEND);
// clouds
glBindTexture (GL_TEXTURE_2D, alphaskytexture);
domescale[0] = 512;
domescale[1] = 512;
domescale[2] = 128;
speedscale = realtime*16;
speedscale -= (int)speedscale & ~127;
R_DrawSkyLayer (speedscale);
if (gl_skymultipass->value) {
glBindTexture (GL_TEXTURE_2D, alphaskytexture);
domescale[0] = 512;
domescale[1] = 512;
domescale[2] = 128;
speedscale = realtime*16;
speedscale -= (int)speedscale & ~127;
R_DrawSkyLayer (speedscale);
}
// glDisable (GL_BLEND);
glColor3f (1,1,1);