From 8c4e57cc9ad49d6886c681ca7d75bf88dac66095 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 29 Sep 2010 07:23:15 +0000 Subject: [PATCH] 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 ::stable-branch::merge=3e2531a30de55e9b77ad90931f865b14a3ccb89c --- gl_rmain.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 52db6d17..d1ddbe95 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -11949,7 +11949,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.uselightmaptexture = false; // simply scan ahead until we find a different texture or lightmap state @@ -11958,7 +11958,7 @@ void R_QueueWorldSurfaceList(int numsurfaces, const msurface_t **surfacelist, in } else { - 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.uselightmaptexture == (surfacelist[j]->lightmaptexture != NULL);j++) ; @@ -12056,7 +12056,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa ; continue; } - if(FAKELIGHT_ENABLED) + if(FAKELIGHT_ENABLED || depthonly || prepass) { rsurface.uselightmaptexture = false; // simply scan ahead until we find a different texture or lightmap state @@ -12065,7 +12065,7 @@ void R_QueueModelSurfaceList(entity_render_t *ent, int numsurfaces, const msurfa } else { - 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.uselightmaptexture == (surfacelist[j]->lightmaptexture != NULL);j++) ; -- 2.39.2