gl_rsurf is now client clean

This commit is contained in:
Bill Currie 2001-05-21 23:09:46 +00:00
parent da8715f27d
commit 0a4b53c817
10 changed files with 18 additions and 19 deletions

View file

@ -172,7 +172,7 @@ void R_ViewChanged (vrect_t *pvrect, int lineadj, float aspect);
void R_AddEfrags (entity_t *ent); void R_AddEfrags (entity_t *ent);
void R_RemoveEfrags (entity_t *ent); void R_RemoveEfrags (entity_t *ent);
void R_NewMap (model_t *worldmodel); void R_NewMap (model_t *worldmodel, struct model_s **models, int num_models);
// LordHavoc: relative bmodel lighting // LordHavoc: relative bmodel lighting

View file

@ -194,7 +194,8 @@ extern GLenum gl_mtex_enum;
void GL_DisableMultitexture (void); void GL_DisableMultitexture (void);
void GL_EnableMultitexture (void); void GL_EnableMultitexture (void);
void GL_BuildLightmaps (void); struct model_s;
void GL_BuildLightmaps (struct model_s **models, int num_models);
void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboolean alpha) ; void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboolean alpha) ;
void GL_Set2D (void); void GL_Set2D (void);
void GL_CheckGamma (unsigned char *pal); void GL_CheckGamma (unsigned char *pal);

View file

@ -313,7 +313,7 @@ CL_ParseServerInfo (void)
// local state // local state
cl_entities[0].model = cl.worldmodel = cl.model_precache[1]; cl_entities[0].model = cl.worldmodel = cl.model_precache[1];
R_NewMap (cl.worldmodel); R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
Hunk_Check (); // make sure nothing is hurt Hunk_Check (); // make sure nothing is hurt

View file

@ -172,7 +172,7 @@ R_Init (void)
void void
R_NewMap (model_t *worldmodel) R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
{ {
int i; int i;
cvar_t *r_skyname; cvar_t *r_skyname;
@ -190,7 +190,7 @@ R_NewMap (model_t *worldmodel)
r_viewleaf = NULL; r_viewleaf = NULL;
R_ClearParticles (); R_ClearParticles ();
GL_BuildLightmaps (); GL_BuildLightmaps (models, num_models);
// identify sky texture // identify sky texture
skytexturenum = -1; skytexturenum = -1;

View file

@ -41,10 +41,9 @@
#include <stdio.h> #include <stdio.h>
#include "QF/compat.h" #include "QF/compat.h"
#include "QF/sys.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h"
#include "client.h"
#include "glquake.h" #include "glquake.h"
#include "r_cvar.h" #include "r_cvar.h"
#include "r_local.h" #include "r_local.h"
@ -1140,7 +1139,7 @@ GL_CreateSurfaceLightmap (msurface_t *surf)
Builds the lightmap texture with all the surfaces from all brush models Builds the lightmap texture with all the surfaces from all brush models
*/ */
void void
GL_BuildLightmaps (void) GL_BuildLightmaps (model_t **models, int num_models)
{ {
int i, j; int i, j;
model_t *m; model_t *m;
@ -1173,8 +1172,8 @@ GL_BuildLightmaps (void)
break; break;
} }
for (j = 1; j < MAX_MODELS; j++) { for (j = 1; j < num_models; j++) {
m = cl.model_precache[j]; m = models[j];
if (!m) if (!m)
break; break;
if (m->name[0] == '*') if (m->name[0] == '*')

View file

@ -182,7 +182,7 @@ R_Init (void)
void void
R_NewMap (model_t *worldmodel) R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
{ {
int i; int i;

View file

@ -297,7 +297,7 @@ Model_NextDownload (void)
// all done // all done
cl.worldmodel = cl.model_precache[1]; cl.worldmodel = cl.model_precache[1];
R_NewMap (cl.worldmodel); R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
Team_NewMap (); Team_NewMap ();
Hunk_Check (); // make sure nothing is hurt Hunk_Check (); // make sure nothing is hurt

View file

@ -172,7 +172,7 @@ R_Init (void)
void void
R_NewMap (model_t *worldmodel) R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
{ {
int i; int i;
cvar_t *r_skyname; cvar_t *r_skyname;
@ -190,7 +190,7 @@ R_NewMap (model_t *worldmodel)
r_viewleaf = NULL; r_viewleaf = NULL;
R_ClearParticles (); R_ClearParticles ();
GL_BuildLightmaps (); GL_BuildLightmaps (models, num_models);
// identify sky texture // identify sky texture
skytexturenum = -1; skytexturenum = -1;

View file

@ -44,7 +44,6 @@
#include "QF/render.h" #include "QF/render.h"
#include "QF/sys.h" #include "QF/sys.h"
#include "client.h"
#include "glquake.h" #include "glquake.h"
#include "r_cvar.h" #include "r_cvar.h"
#include "r_local.h" #include "r_local.h"
@ -1140,7 +1139,7 @@ GL_CreateSurfaceLightmap (msurface_t *surf)
Builds the lightmap texture with all the surfaces from all brush models Builds the lightmap texture with all the surfaces from all brush models
*/ */
void void
GL_BuildLightmaps (void) GL_BuildLightmaps (model_t **models, int num_models)
{ {
int i, j; int i, j;
model_t *m; model_t *m;
@ -1173,8 +1172,8 @@ GL_BuildLightmaps (void)
break; break;
} }
for (j = 1; j < MAX_MODELS; j++) { for (j = 1; j < num_models; j++) {
m = cl.model_precache[j]; m = models[j];
if (!m) if (!m)
break; break;
if (m->name[0] == '*') if (m->name[0] == '*')

View file

@ -182,7 +182,7 @@ R_Init (void)
void void
R_NewMap (model_t *worldmodel) R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
{ {
int i; int i;