]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
sprite tracking distance fix; update inverse view matrix before rendering a scene...
[xonotic/darkplaces.git] / gl_rsurf.c
index 6e642ce0fa09cdbe574e94888e86a849ebb075ff..fafbf1d39e3d5415931a3fee893da1611faa4254 100644 (file)
@@ -52,6 +52,9 @@ void R_BuildLightMap (const entity_render_t *ent, msurface_t *surface)
        size = smax*tmax;
        size3 = size*3;
 
+       r_refdef.stats.lightmapupdatepixels += size;
+       r_refdef.stats.lightmapupdates++;
+
        if (cl.buildlightmapmemorysize < size*sizeof(int[3]))
        {
                cl.buildlightmapmemorysize = size*sizeof(int[3]);
@@ -1026,7 +1029,7 @@ static void R_Q1BSP_DrawLight_TransparentCallback(const entity_render_t *ent, co
        R_Shadow_RenderMode_End();
 }
 
-#define RSURF_MAX_BATCHSURFACES 1024
+#define RSURF_MAX_BATCHSURFACES 8192
 
 void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs)
 {
@@ -1039,9 +1042,7 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface
        int batchelements[BATCHSIZE*3];
        texture_t *tex;
        CHECKGLERROR
-       RSurf_ActiveModelEntity(ent, true, true);
        R_UpdateAllTextureInfo(ent);
-       CHECKGLERROR
        culltriangles = r_shadow_culltriangles.integer && !(ent->flags & RENDER_NOSELFSHADOW);
        element3i = rsurface.modelelement3i;
        // this is a double loop because non-visible surface skipping has to be