]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
reenabled R_UpdateAllTextureInfo calls when lighting the world model
[xonotic/darkplaces.git] / gl_rsurf.c
index 6e642ce0fa09cdbe574e94888e86a849ebb075ff..4afc3a07363060bc481539911a54baefae01bc4b 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,6 @@ 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