mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 21:41:57 +00:00
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:
parent
b0f20f955c
commit
92baf1a751
4 changed files with 13 additions and 7 deletions
|
@ -225,6 +225,7 @@ extern cvar_t *gl_max_size;
|
||||||
extern cvar_t *gl_playermip;
|
extern cvar_t *gl_playermip;
|
||||||
|
|
||||||
extern cvar_t *r_skyname;
|
extern cvar_t *r_skyname;
|
||||||
|
extern cvar_t *gl_skymultipass;
|
||||||
|
|
||||||
extern int mirrortexturenum; // quake texturenum, not gltexturenum
|
extern int mirrortexturenum; // quake texturenum, not gltexturenum
|
||||||
extern qboolean mirror;
|
extern qboolean mirror;
|
||||||
|
|
|
@ -122,6 +122,7 @@ cvar_t *gl_reporttjunctions;
|
||||||
cvar_t *gl_particles;
|
cvar_t *gl_particles;
|
||||||
|
|
||||||
cvar_t *r_skyname;
|
cvar_t *r_skyname;
|
||||||
|
cvar_t *gl_skymultipass;
|
||||||
|
|
||||||
extern cvar_t *scr_fov;
|
extern cvar_t *scr_fov;
|
||||||
|
|
||||||
|
|
|
@ -272,6 +272,8 @@ void R_Init (void)
|
||||||
|
|
||||||
r_skyname = Cvar_Get("r_skyname", "none", CVAR_NONE,
|
r_skyname = Cvar_Get("r_skyname", "none", CVAR_NONE,
|
||||||
"name of the current skybox");
|
"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();
|
R_InitBubble();
|
||||||
|
|
||||||
|
|
|
@ -754,13 +754,15 @@ R_DrawSkyDome (void)
|
||||||
glEnable (GL_BLEND);
|
glEnable (GL_BLEND);
|
||||||
|
|
||||||
// clouds
|
// clouds
|
||||||
glBindTexture (GL_TEXTURE_2D, alphaskytexture);
|
if (gl_skymultipass->value) {
|
||||||
domescale[0] = 512;
|
glBindTexture (GL_TEXTURE_2D, alphaskytexture);
|
||||||
domescale[1] = 512;
|
domescale[0] = 512;
|
||||||
domescale[2] = 128;
|
domescale[1] = 512;
|
||||||
speedscale = realtime*16;
|
domescale[2] = 128;
|
||||||
speedscale -= (int)speedscale & ~127;
|
speedscale = realtime*16;
|
||||||
R_DrawSkyLayer (speedscale);
|
speedscale -= (int)speedscale & ~127;
|
||||||
|
R_DrawSkyLayer (speedscale);
|
||||||
|
}
|
||||||
|
|
||||||
// glDisable (GL_BLEND);
|
// glDisable (GL_BLEND);
|
||||||
glColor3f (1,1,1);
|
glColor3f (1,1,1);
|
||||||
|
|
Loading…
Reference in a new issue