removed r_mergesky
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 Feb 2002 03:45:00 +0000 (03:45 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 25 Feb 2002 03:45:00 +0000 (03:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1565 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c
r_sky.c
render.h

index 465e124..07f800e 100644 (file)
@@ -559,10 +559,7 @@ static int RSurfShader_Sky(int stage, msurface_t *s)
                        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);
@@ -619,7 +616,7 @@ static int RSurfShader_Sky(int stage, msurface_t *s)
        }
        else if (stage == 1)
        {
-               if (skyrenderglquake && !r_mergesky.integer)
+               if (skyrenderglquake)
                {
                        memset(&m, 0, sizeof(m));
                        m.transparent = false;
diff --git a/r_sky.c b/r_sky.c
index fb991b5..3c11c30 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -3,7 +3,6 @@
 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];
@@ -49,7 +48,6 @@ void R_Sky_Init(void)
 {
        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);
 }
@@ -81,12 +79,6 @@ void R_SkyStartFrame(void)
                                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
@@ -347,23 +339,14 @@ static void R_SkySphere(void)
        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();
index 3fdbe0f..5df1927 100644 (file)
--- a/render.h
+++ b/render.h
@@ -38,7 +38,6 @@ extern rtexture_t *solidskytexture;
 extern rtexture_t *alphaskytexture;
 extern rtexture_t *mergeskytexture;
 extern int skyrendernow, skyrendermasked, skyrenderglquake;
-extern cvar_t r_mergesky;
 extern void R_SkyStartFrame(void);
 extern void R_Sky(void);