]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - meshqueue.c
modified gamma handling, now VID_UpdateGamma is only called from VID_Finish, and...
[xonotic/darkplaces.git] / meshqueue.c
index a9b7ac0b925ca6d128d55332bda4ec24f0f020c7..b7087c01292d8e98025d59468858e7913b02a1c9 100644 (file)
@@ -2,9 +2,9 @@
 #include "quakedef.h"
 #include "meshqueue.h"
 
-cvar_t r_meshqueue_entries = {CVAR_SAVE, "r_meshqueue_entries", "16"};
-cvar_t r_meshqueue_immediaterender = {0, "r_meshqueue_immediaterender", "0"};
-cvar_t r_meshqueue_sort = {0, "r_meshqueue_sort", "0"};
+cvar_t r_meshqueue_entries = {CVAR_SAVE, "r_meshqueue_entries", "16", "maximum number of meshes to batch together and sort before issuing render calls (unused)"};
+cvar_t r_meshqueue_immediaterender = {0, "r_meshqueue_immediaterender", "0", "immediately render non-transparent meshes rather than batching"};
+cvar_t r_meshqueue_sort = {0, "r_meshqueue_sort", "0", "whether to sort meshes in a batch before issuing calls"};
 
 typedef struct meshqueue_s
 {
@@ -49,7 +49,7 @@ void R_MeshQueue_Render(void)
 static void R_MeshQueue_EnlargeTransparentArray(int newtotal)
 {
        meshqueue_t *newarray;
-       newarray = (meshqueue_t *)Mem_Alloc(cl_mempool, newtotal * sizeof(meshqueue_t));
+       newarray = (meshqueue_t *)Mem_Alloc(cls.permanentmempool, newtotal * sizeof(meshqueue_t));
        if (mqt_array)
        {
                memcpy(newarray, mqt_array, mqt_total * sizeof(meshqueue_t));
@@ -167,11 +167,11 @@ void R_MeshQueue_BeginScene(void)
                mq_total = r_meshqueue_entries.integer;
                if (mq_array)
                        Mem_Free(mq_array);
-               mq_array = (meshqueue_t *)Mem_Alloc(cl_mempool, mq_total * sizeof(meshqueue_t));
+               mq_array = (meshqueue_t *)Mem_Alloc(cls.permanentmempool, mq_total * sizeof(meshqueue_t));
        }
 
        if (mqt_array == NULL)
-               mqt_array = (meshqueue_t *)Mem_Alloc(cl_mempool, mqt_total * sizeof(meshqueue_t));
+               mqt_array = (meshqueue_t *)Mem_Alloc(cls.permanentmempool, mqt_total * sizeof(meshqueue_t));
 
        mq_count = 0;
        mqt_count = 0;