]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - meshqueue.c
now parses more of q3 shaders to guess at proper rendering settings for surfaces...
[xonotic/darkplaces.git] / meshqueue.c
index fdbb60e9a7b5db9e0734ea72f1aa09f1a324e4dc..24744f310895746d0276110450086ab4c8c776f3 100644 (file)
@@ -29,9 +29,9 @@ void R_MeshQueue_Init(void)
        Cvar_RegisterVariable(&r_meshqueue_immediaterender);
        Cvar_RegisterVariable(&r_meshqueue_sort);
 
-       meshqueuemempool = Mem_AllocPool("R_MeshQueue");
+       meshqueuemempool = Mem_AllocPool("R_MeshQueue", 0, NULL);
        mq_total = 0;
-       mqt_total = 1000;
+       mqt_total = 0;
        mq_array = NULL;
        mqt_array = NULL;
 }
@@ -112,7 +112,7 @@ void R_MeshQueue_AddTransparent(const vec3_t center, void (*callback)(const void
        mq->callback = callback;
        mq->data1 = data1;
        mq->data2 = data2;
-       mq->dist = DotProduct(center, vpn) - mqt_viewplanedist;
+       mq->dist = DotProduct(center, r_viewforward) - mqt_viewplanedist;
        mq->next = NULL;
 }
 
@@ -167,7 +167,7 @@ void R_MeshQueue_BeginScene(void)
        mq_count = 0;
        mqt_count = 0;
        mq_listhead = NULL;
-       mqt_viewplanedist = DotProduct(r_origin, vpn);
+       mqt_viewplanedist = DotProduct(r_vieworigin, r_viewforward);
 }
 
 void R_MeshQueue_EndScene(void)