From 2887dd3950485342b3f8b4a72e589de8a3845426 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Thu, 2 Aug 2001 04:12:26 +0000 Subject: [PATCH] Fix issue with gl_lightmap_components 4 and lightmap updates. --- libs/video/renderer/gl/gl_rsurf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/video/renderer/gl/gl_rsurf.c b/libs/video/renderer/gl/gl_rsurf.c index a055d5a74..55ac5a420 100644 --- a/libs/video/renderer/gl/gl_rsurf.c +++ b/libs/video/renderer/gl/gl_rsurf.c @@ -281,7 +281,7 @@ R_BuildLightMap (msurface_t *surf, byte * dest, int stride) dest[1] = bound(0, bl[1] >> shift, 255); dest[2] = bound(0, bl[2] >> shift, 255); dest[3] = 255; - dest += 4; + dest += lightmap_bytes; bl += 3; } } @@ -292,7 +292,7 @@ R_BuildLightMap (msurface_t *surf, byte * dest, int stride) dest[0] = bound(0, bl[0] >> shift, 255); dest[1] = bound(0, bl[1] >> shift, 255); dest[2] = bound(0, bl[2] >> shift, 255); - dest += 3; + dest += lightmap_bytes; bl += 3; } } @@ -1168,7 +1168,7 @@ GL_BuildLightmaps (model_t **models, int num_models) default: gl_internalformat = 3; gl_lightmap_format = GL_RGBA; - lightmap_bytes = 3; + lightmap_bytes = 4; break; }