]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
move R_UpdateAllTextureInfo call back to DrawLight
[xonotic/darkplaces.git] / gl_rsurf.c
index b333d16f4a70361b9ad3cf7dd063df6f92a2f676..fafbf1d39e3d5415931a3fee893da1611faa4254 100644 (file)
@@ -1029,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)
 {
@@ -1042,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