From fc2df393e29803fad1ac52a0dabdbe797800829f Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 27 Feb 2010 21:08:14 +0000 Subject: [PATCH] minor cleanup to R_DrawSurface_TransparentCallback git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10028 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index e91a8d19..c976cda4 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -11226,7 +11226,8 @@ static void R_DrawSurface_TransparentCallback(const entity_render_t *ent, const int texturenumsurfaces, endsurface; texture_t *texture; const msurface_t *surface; - const msurface_t *texturesurfacelist[256]; +#define MAXBATCH_TRANSPARENTSURFACES 256 + const msurface_t *texturesurfacelist[MAXBATCH_TRANSPARENTSURFACES]; // if the model is static it doesn't matter what value we give for // wantnormals and wanttangents, so this logic uses only rules applicable @@ -11303,7 +11304,7 @@ static void R_DrawSurface_TransparentCallback(const entity_render_t *ent, const rsurface.texture = R_GetCurrentTexture(texture); rsurface.uselightmaptexture = surface->lightmaptexture != NULL; // scan ahead until we find a different texture - endsurface = min(i + 1024, numsurfaces); + endsurface = min(i + MAXBATCH_TRANSPARENTSURFACES, numsurfaces); texturenumsurfaces = 0; texturesurfacelist[texturenumsurfaces++] = surface; for (;j < endsurface;j++) -- 2.39.2