mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
gl_rsurf is now client clean
This commit is contained in:
parent
da8715f27d
commit
0a4b53c817
10 changed files with 18 additions and 19 deletions
|
@ -172,7 +172,7 @@ void R_ViewChanged (vrect_t *pvrect, int lineadj, float aspect);
|
|||
void R_AddEfrags (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
|
||||
|
|
|
@ -194,7 +194,8 @@ extern GLenum gl_mtex_enum;
|
|||
|
||||
void GL_DisableMultitexture (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_Set2D (void);
|
||||
void GL_CheckGamma (unsigned char *pal);
|
||||
|
|
|
@ -313,7 +313,7 @@ CL_ParseServerInfo (void)
|
|||
// local state
|
||||
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
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ R_Init (void)
|
|||
|
||||
|
||||
void
|
||||
R_NewMap (model_t *worldmodel)
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
int i;
|
||||
cvar_t *r_skyname;
|
||||
|
@ -190,7 +190,7 @@ R_NewMap (model_t *worldmodel)
|
|||
r_viewleaf = NULL;
|
||||
R_ClearParticles ();
|
||||
|
||||
GL_BuildLightmaps ();
|
||||
GL_BuildLightmaps (models, num_models);
|
||||
|
||||
// identify sky texture
|
||||
skytexturenum = -1;
|
||||
|
|
|
@ -41,10 +41,9 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "QF/compat.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/render.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "glquake.h"
|
||||
#include "r_cvar.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
|
||||
*/
|
||||
void
|
||||
GL_BuildLightmaps (void)
|
||||
GL_BuildLightmaps (model_t **models, int num_models)
|
||||
{
|
||||
int i, j;
|
||||
model_t *m;
|
||||
|
@ -1173,8 +1172,8 @@ GL_BuildLightmaps (void)
|
|||
break;
|
||||
}
|
||||
|
||||
for (j = 1; j < MAX_MODELS; j++) {
|
||||
m = cl.model_precache[j];
|
||||
for (j = 1; j < num_models; j++) {
|
||||
m = models[j];
|
||||
if (!m)
|
||||
break;
|
||||
if (m->name[0] == '*')
|
||||
|
|
|
@ -182,7 +182,7 @@ R_Init (void)
|
|||
|
||||
|
||||
void
|
||||
R_NewMap (model_t *worldmodel)
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ Model_NextDownload (void)
|
|||
// all done
|
||||
cl.worldmodel = cl.model_precache[1];
|
||||
|
||||
R_NewMap (cl.worldmodel);
|
||||
R_NewMap (cl.worldmodel, cl.model_precache, MAX_MODELS);
|
||||
Team_NewMap ();
|
||||
Hunk_Check (); // make sure nothing is hurt
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ R_Init (void)
|
|||
|
||||
|
||||
void
|
||||
R_NewMap (model_t *worldmodel)
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
int i;
|
||||
cvar_t *r_skyname;
|
||||
|
@ -190,7 +190,7 @@ R_NewMap (model_t *worldmodel)
|
|||
r_viewleaf = NULL;
|
||||
R_ClearParticles ();
|
||||
|
||||
GL_BuildLightmaps ();
|
||||
GL_BuildLightmaps (models, num_models);
|
||||
|
||||
// identify sky texture
|
||||
skytexturenum = -1;
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "QF/render.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "glquake.h"
|
||||
#include "r_cvar.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
|
||||
*/
|
||||
void
|
||||
GL_BuildLightmaps (void)
|
||||
GL_BuildLightmaps (model_t **models, int num_models)
|
||||
{
|
||||
int i, j;
|
||||
model_t *m;
|
||||
|
@ -1173,8 +1172,8 @@ GL_BuildLightmaps (void)
|
|||
break;
|
||||
}
|
||||
|
||||
for (j = 1; j < MAX_MODELS; j++) {
|
||||
m = cl.model_precache[j];
|
||||
for (j = 1; j < num_models; j++) {
|
||||
m = models[j];
|
||||
if (!m)
|
||||
break;
|
||||
if (m->name[0] == '*')
|
||||
|
|
|
@ -182,7 +182,7 @@ R_Init (void)
|
|||
|
||||
|
||||
void
|
||||
R_NewMap (model_t *worldmodel)
|
||||
R_NewMap (model_t *worldmodel, struct model_s **models, int num_models)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Reference in a new issue