]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
now clears view to fog color if fog is enabled, this should cure fogging of sky in...
[xonotic/darkplaces.git] / gl_backend.c
index 782329d1e3b054c82f97cc7f719fba8ac0d9c0d5..cb24fd3a7a625736bd62a321a4550737c8cae078 100644 (file)
@@ -84,7 +84,6 @@ static matrix4x4_t backend_glmodelviewmatrix;
 static matrix4x4_t backend_projectmatrix;
 
 static unsigned int backendunits, backendimageunits, backendarrayunits, backendactive;
-static mempool_t *gl_backend_mempool;
 
 /*
 note: here's strip order for a terrain row:
@@ -146,15 +145,12 @@ static void R_Mesh_CacheArray_Startup(void);
 static void R_Mesh_CacheArray_Shutdown(void);
 void GL_Backend_AllocArrays(void)
 {
-       if (!gl_backend_mempool)
-               gl_backend_mempool = Mem_AllocPool("GL_Backend", 0, NULL);
        R_Mesh_CacheArray_Startup();
 }
 
 void GL_Backend_FreeArrays(void)
 {
        R_Mesh_CacheArray_Shutdown();
-       Mem_FreePool(&gl_backend_mempool);
 }
 
 static void gl_backend_start(void)
@@ -1652,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)
                {
@@ -1797,7 +1797,7 @@ void SCR_UpdateLoadingScreen (void)
        R_Mesh_Start();
        R_Mesh_Matrix(&r_identitymatrix);
        // draw the loading plaque
-       pic = Draw_CachePic("gfx/loading.lmp");
+       pic = Draw_CachePic("gfx/loading.lmp", false);
        x = (vid_conwidth.integer - pic->width)/2;
        y = (vid_conheight.integer - pic->height)/2;
        GL_Color(1,1,1,1);