]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_sky.c
Fixed windows input (bad,bad hack)
[xonotic/darkplaces.git] / r_sky.c
diff --git a/r_sky.c b/r_sky.c
index 2995a85dd6e17dc1f5300cb482637996bb8ba148..c216ed2ac2be66c539c8f22b396bfd4876213eec 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -186,18 +186,18 @@ float skyboxtexcoord2f[6*4*2] =
 
 int skyboxelements[6*2*3] =
 {
-       // skyside[0]
-        8,  9, 10,
-        8, 10, 11,
+       // skyside[3]
+        0,  1,  2,
+        0,  2,  3,
        // skyside[1]
         4,  5,  6,
         4,  6,  7,
+       // skyside[0]
+        8,  9, 10,
+        8, 10, 11,
        // skyside[2]
        12, 13, 14,
        12, 14, 15,
-       // skyside[3]
-        0,  1,  2,
-        0,  2,  3,
        // skyside[4]
        16, 17, 18,
        16, 18, 19,
@@ -210,7 +210,7 @@ static void R_SkyBox(void)
 {
        int i;
        rmeshstate_t m;
-       GL_Color(r_colorscale, r_colorscale, r_colorscale, 1);
+       GL_Color(1, 1, 1, 1);
        memset(&m, 0, sizeof(m));
        GL_BlendFunc(GL_ONE, GL_ZERO);
        GL_DepthMask(true);
@@ -221,7 +221,7 @@ static void R_SkyBox(void)
        {
                m.tex[0] = R_GetTexture(skyboxside[i]);
                R_Mesh_State_Texture(&m);
-               R_Mesh_Draw(4, 2, skyboxelements + i * 6);
+               R_Mesh_Draw(6*4, 2, skyboxelements + i * 6);
        }
 }
 
@@ -306,7 +306,7 @@ static void R_SkySphere(void)
        Matrix4x4_CreateIdentity(&identitymatrix);
 
        GL_VertexPointer(skysphere_vertex3f);
-       GL_Color(r_colorscale, r_colorscale, r_colorscale, 1);
+       GL_Color(1, 1, 1, 1);
        GL_BlendFunc(GL_ONE, GL_ZERO);
        GL_DepthMask(true);
        GL_DepthTest(false); // don't modify or read zbuffer
@@ -314,7 +314,7 @@ static void R_SkySphere(void)
        m.tex[0] = R_GetTexture(solidskytexture);
        m.pointer_texcoord[0] = skysphere_texcoord2f;
        R_Mesh_TextureMatrix(0, &scroll1matrix);
-       if (r_colorscale == 1 && r_textureunits.integer >= 2)
+       if (r_textureunits.integer >= 2)
        {
                // one pass using GL_DECAL or GL_INTERPOLATE_ARB for alpha layer
                // LordHavoc: note that color is not set here because it does not