now clears view to fog color if fog is enabled, this should cure fogging of sky in...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Apr 2005 21:22:09 +0000 (21:22 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 Apr 2005 21:22:09 +0000 (21:22 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5198 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index d56bc79..cb24fd3 100644 (file)
@@ -1648,7 +1648,11 @@ void R_ClearScreen(void)
        if (r_render.integer)
        {
                // clear to black
-               qglClearColor(0,0,0,0);CHECKGLERROR
+               if (fogenabled)
+                       qglClearColor(fogcolor[0],fogcolor[1],fogcolor[2],0);
+               else
+                       qglClearColor(0,0,0,0);
+               CHECKGLERROR
                qglClearDepth(1);CHECKGLERROR
                if (gl_stencil)
                {