]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_sky.c
i'm sure there are plenty of bugs here for you guys to fix
[xonotic/darkplaces.git] / r_sky.c
diff --git a/r_sky.c b/r_sky.c
index 51caa6cecb4cfb926f8744dabb02c5087b50b050..340be966300574433b8c0acab172fca5dca95256 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -115,7 +115,7 @@ int R_LoadSkyBox(void)
                        }
                        temp = (unsigned char *)Mem_Alloc(tempmempool, image_width*image_height*4);
                        Image_CopyMux (temp, image_rgba, image_width, image_height, suffix[j][i].flipx, suffix[j][i].flipy, suffix[j][i].flipdiagonal, 4, 4, indices);
-                       skyboxside[i] = R_LoadTexture2D(skytexturepool, va("skyboxside%d", i), image_width, image_height, temp, TEXTYPE_RGBA, TEXF_CLAMP | TEXF_PRECACHE, NULL);
+                       skyboxside[i] = R_LoadTexture2D(skytexturepool, va("skyboxside%d", i), image_width, image_height, temp, TEXTYPE_RGBA, TEXF_CLAMP | TEXF_PRECACHE | (gl_texturecompression_sky.integer ? TEXF_COMPRESS : 0), NULL);
                        Mem_Free(image_rgba);
                        Mem_Free(temp);
                        success++;
@@ -271,6 +271,7 @@ static void R_SkyBox(void)
        // FIXME: fixed function path can't properly handle r_view.colorscale > 1
        GL_Color(1 * r_view.colorscale, 1 * r_view.colorscale, 1 * r_view.colorscale, 1);
        GL_BlendFunc(GL_ONE, GL_ZERO);
+       GL_CullFace(GL_NONE);
        GL_DepthMask(false);
        GL_DepthRange(0, 1);
        GL_PolygonOffset(0, 0);
@@ -371,6 +372,7 @@ static void R_SkySphere(void)
        // FIXME: fixed function path can't properly handle r_view.colorscale > 1
        GL_Color(1 * r_view.colorscale, 1 * r_view.colorscale, 1 * r_view.colorscale, 1);
        GL_BlendFunc(GL_ONE, GL_ZERO);
+       GL_CullFace(GL_NONE);
        GL_DepthMask(true);
        GL_DepthRange(0, 1);
        GL_PolygonOffset(0, 0);