]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
depthonly, prepass: do not compare lightmap texture for batching (less meshes)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 29 Sep 2010 07:23:15 +0000 (07:23 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 29 Sep 2010 07:23:15 +0000 (07:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10507 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index bcdadb5e4cf6b6d42e9097bc0979faf765dce5c1..8d60afd81324df68448fc43bc7c7e1800ad38778 100644 (file)
@@ -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++)
                                ;