From: divverent Date: Wed, 29 Sep 2010 07:23:15 +0000 (+0000) Subject: depthonly, prepass: do not compare lightmap texture for batching (less meshes) X-Git-Tag: xonotic-v0.1.0preview~56^2~110 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3e2531a30de55e9b77ad90931f865b14a3ccb89c;p=xonotic%2Fdarkplaces.git depthonly, prepass: do not compare lightmap texture for batching (less meshes) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10507 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index bcdadb5e..8d60afd8 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -13025,7 +13025,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.lightmaptexture = NULL; rsurface.deluxemaptexture = NULL; @@ -13038,7 +13038,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in { rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; - rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; + rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL; // simply scan ahead until we find a different texture or lightmap state for (;j < numsurfaces && texture == surfacelist[j]->texture && rsurface.lightmaptexture == surfacelist[j]->lightmaptexture;j++) ; @@ -13101,7 +13101,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.lightmaptexture = NULL; rsurface.deluxemaptexture = NULL; @@ -13114,7 +13114,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa { rsurface.lightmaptexture = surfacelist[i]->lightmaptexture; rsurface.deluxemaptexture = surfacelist[i]->deluxemaptexture; - rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL && !depthonly && !prepass; + rsurface.uselightmaptexture = surfacelist[i]->lightmaptexture != NULL; // simply scan ahead until we find a different texture or lightmap state for (;j < numsurfaces && texture == surfacelist[j]->texture && rsurface.lightmaptexture == surfacelist[j]->lightmaptexture;j++) ;