]> 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)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 29 Sep 2010 07:24:53 +0000 (09:24 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10507 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=3e2531a30de55e9b77ad90931f865b14a3ccb89c

gl_rmain.c

index 52db6d177efc4cdcfd01eac577daa5f65334654c..d1ddbe951837bb02902745113723838fa414b808 100644 (file)
@@ -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++)
                                ;