From 228c5a0ecfda2aefc7885d6d2fd07512ad426a53 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 26 Feb 2004 00:33:24 +0000 Subject: [PATCH] don't bother binding unmodified lightmaps --- libs/video/renderer/gl/gl_lightmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/video/renderer/gl/gl_lightmap.c b/libs/video/renderer/gl/gl_lightmap.c index 6b5509610..fef85c354 100644 --- a/libs/video/renderer/gl/gl_lightmap.c +++ b/libs/video/renderer/gl/gl_lightmap.c @@ -543,8 +543,8 @@ R_CalcLightmaps (void) p = lightmap_polys[i]; if (!p) continue; - qfglBindTexture (GL_TEXTURE_2D, lightmap_textures + i); if (lightmap_modified[i]) { + qfglBindTexture (GL_TEXTURE_2D, lightmap_textures + i); GL_UploadLightmap (i); lightmap_modified[i] = false; } @@ -652,8 +652,8 @@ R_CalcAndBlendLightmaps (void) p = lightmap_polys[i]; if (!p) continue; - qfglBindTexture (GL_TEXTURE_2D, lightmap_textures + i); if (lightmap_modified[i]) { + qfglBindTexture (GL_TEXTURE_2D, lightmap_textures + i); GL_UploadLightmap (i); lightmap_modified[i] = false; }