m.cg = 1;
m.cb = 1;
m.ca = 1;
- if (r_mergesky.integer)
- m.tex[0] = R_GetTexture(mergeskytexture);
- else
- m.tex[0] = R_GetTexture(solidskytexture);
+ m.tex[0] = R_GetTexture(solidskytexture);
m.texcoords[0] = &svert[0].st[0];
m.texcoordstep[0] = sizeof(surfvert_t);
speedscale = cl.time * (8.0/128.0);
}
else if (stage == 1)
{
- if (skyrenderglquake && !r_mergesky.integer)
+ if (skyrenderglquake)
{
memset(&m, 0, sizeof(m));
m.transparent = false;
void LoadSky_f(void);
cvar_t r_skyquality = {CVAR_SAVE, "r_skyquality", "2"};
-cvar_t r_mergesky = {CVAR_SAVE, "r_mergesky", "0"};
cvar_t r_skyflush = {0, "r_skyflush", "0"};
static char skyworldname[1024];
{
Cmd_AddCommand ("loadsky", &LoadSky_f);
Cvar_RegisterVariable (&r_skyquality);
- Cvar_RegisterVariable (&r_mergesky);
Cvar_RegisterVariable (&r_skyflush);
R_RegisterModule("R_Sky", r_sky_start, r_sky_shutdown, r_sky_newmap);
}
break;
}
}
- if (r_mergesky.integer && (skyrenderglquake || skyrendersphere))
- {
- // R_BuildSky((int) (cl.time * 8.0), (int) (cl.time * 16.0));
- // R_BuildSky((int) (cl.time * -8.0), 0);
- R_BuildSky(0, (int) (cl.time * 8.0));
- }
if (skyrenderbox || skyrendersphere)
{
// for depth-masked sky, render the sky on the first sky surface encountered
speedscale2 = cl.time*16.0/128.0;
speedscale2 -= (int)speedscale2;
skyspherearrays(vert, tex, tex2, skysphere, speedscale, speedscale2);
- // do not lock the texcoord array, because it will be switched
- if (r_mergesky.integer)
- {
- m.tex[0] = R_GetTexture(mergeskytexture);
- R_Mesh_Draw(&m);
- }
- else
- {
- m.tex[0] = R_GetTexture(solidskytexture);
- R_Mesh_Draw(&m);
-
- m.blendfunc1 = GL_SRC_ALPHA;
- m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA;
- m.tex[0] = R_GetTexture(alphaskytexture);
- m.texcoords[0] = tex2;
- R_Mesh_Draw(&m);
- }
+ m.tex[0] = R_GetTexture(solidskytexture);
+ R_Mesh_Draw(&m);
+
+ m.blendfunc1 = GL_SRC_ALPHA;
+ m.blendfunc2 = GL_ONE_MINUS_SRC_ALPHA;
+ m.tex[0] = R_GetTexture(alphaskytexture);
+ m.texcoords[0] = tex2;
+ R_Mesh_Draw(&m);
R_Mesh_Render();
if (r_skyflush.integer)
glFlush();