Fix up d3d builds a smidge.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6108 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
803d3801c9
commit
6a2c21f14d
5 changed files with 42 additions and 36 deletions
|
@ -1333,7 +1333,10 @@ void M_Menu_Preset_f (void)
|
||||||
emenu_t *menu;
|
emenu_t *menu;
|
||||||
int y;
|
int y;
|
||||||
menuoption_t *presetoption[7];
|
menuoption_t *presetoption[7];
|
||||||
extern cvar_t r_nolerp, r_bloom, sv_nqplayerphysics, r_shadow_realtime_world_importlightentitiesfrommap;
|
extern cvar_t r_nolerp, sv_nqplayerphysics;
|
||||||
|
#if defined(RTLIGHTS) && (defined(GLQUAKE) || defined(VKQUAKE))
|
||||||
|
extern cvar_t r_bloom, r_shadow_realtime_world_importlightentitiesfrommap;
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *deluxeopts[] = {
|
static const char *deluxeopts[] = {
|
||||||
"Off",
|
"Off",
|
||||||
|
|
|
@ -586,6 +586,14 @@ const char *RelightGetProgress(float *progress); //reports filename and progress
|
||||||
void RelightTerminate(struct model_s *mod); //NULL acts as a wildcard
|
void RelightTerminate(struct model_s *mod); //NULL acts as a wildcard
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct builddata_s
|
||||||
|
{
|
||||||
|
void (*buildfunc)(struct model_s *mod, struct msurface_s *surf, struct builddata_s *bd);
|
||||||
|
qboolean paintlightmaps;
|
||||||
|
void *facedata;
|
||||||
|
};
|
||||||
|
void Mod_Batches_Build(struct model_s *mod, struct builddata_s *bd);
|
||||||
|
shader_t *Mod_RegisterBasicShader(struct model_s *mod, const char *texname, unsigned int usageflags, const char *shadertext, uploadfmt_t pixelfmt, unsigned int width, unsigned int height, void *pixeldata, void *palettedata);
|
||||||
|
|
||||||
extern struct model_s *currentmodel;
|
extern struct model_s *currentmodel;
|
||||||
|
|
||||||
|
|
|
@ -3238,33 +3238,6 @@ void Mod_Batches_Build(model_t *mod, builddata_t *bd)
|
||||||
if (BE_GenBrushModelVBO)
|
if (BE_GenBrushModelVBO)
|
||||||
BE_GenBrushModelVBO(mod);
|
BE_GenBrushModelVBO(mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
shader_t *Mod_RegisterBasicShader(struct model_s *mod, const char *texname, unsigned int usageflags, const char *shadertext, uploadfmt_t pixelfmt, unsigned int width, unsigned int height, void *pixeldata, void *palettedata)
|
|
||||||
{
|
|
||||||
shader_t *s;
|
|
||||||
unsigned int maps;
|
|
||||||
char mapbase[64];
|
|
||||||
if (shadertext)
|
|
||||||
s = R_RegisterShader(texname, usageflags, shadertext);
|
|
||||||
else if (mod->type == mod_brush)
|
|
||||||
s = R_RegisterCustom(mod, texname, usageflags, Shader_DefaultSkin, NULL);
|
|
||||||
else
|
|
||||||
s = R_RegisterCustom(mod, texname, usageflags, Shader_DefaultBSPLM, NULL);
|
|
||||||
|
|
||||||
|
|
||||||
maps = 0;
|
|
||||||
maps |= SHADER_HASPALETTED;
|
|
||||||
maps |= SHADER_HASDIFFUSE;
|
|
||||||
if (r_fb_bmodels.ival)
|
|
||||||
maps |= SHADER_HASFULLBRIGHT;
|
|
||||||
if (r_loadbumpmapping || s->defaulttextures->reflectcube)
|
|
||||||
maps |= SHADER_HASNORMALMAP;
|
|
||||||
if (gl_specular.ival)
|
|
||||||
maps |= SHADER_HASGLOSS;
|
|
||||||
COM_FileBase(mod->name, mapbase, sizeof(mapbase));
|
|
||||||
R_BuildLegacyTexnums(s, texname, mapbase, maps, 0, pixelfmt, width, height, pixeldata, palettedata);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6366,6 +6366,36 @@ void QDECL R_BuildLegacyTexnums(shader_t *shader, const char *fallbackname, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shader_t *Mod_RegisterBasicShader(struct model_s *mod, const char *texname, unsigned int usageflags, const char *shadertext, uploadfmt_t pixelfmt, unsigned int width, unsigned int height, void *pixeldata, void *palettedata)
|
||||||
|
{
|
||||||
|
extern cvar_t r_fb_bmodels, r_fb_models;
|
||||||
|
extern cvar_t gl_specular;
|
||||||
|
shader_t *s;
|
||||||
|
unsigned int maps;
|
||||||
|
char mapbase[64];
|
||||||
|
if (shadertext)
|
||||||
|
s = R_RegisterShader(texname, usageflags, shadertext);
|
||||||
|
else if (mod->type == mod_brush)
|
||||||
|
s = R_RegisterCustom(mod, texname, usageflags, Shader_DefaultSkin, NULL);
|
||||||
|
else
|
||||||
|
s = R_RegisterCustom(mod, texname, usageflags, Shader_DefaultBSPLM, NULL);
|
||||||
|
|
||||||
|
maps = 0;
|
||||||
|
maps |= SHADER_HASPALETTED;
|
||||||
|
maps |= SHADER_HASDIFFUSE;
|
||||||
|
if (mod->type == mod_alias)
|
||||||
|
maps |= SHADER_HASTOPBOTTOM;
|
||||||
|
if ((mod->type == mod_brush)?r_fb_bmodels.ival:r_fb_models.ival)
|
||||||
|
maps |= SHADER_HASFULLBRIGHT;
|
||||||
|
if (r_loadbumpmapping || s->defaulttextures->reflectcube)
|
||||||
|
maps |= SHADER_HASNORMALMAP;
|
||||||
|
if (gl_specular.ival)
|
||||||
|
maps |= SHADER_HASGLOSS;
|
||||||
|
COM_FileBase(mod->name, mapbase, sizeof(mapbase));
|
||||||
|
R_BuildLegacyTexnums(s, texname, mapbase, maps, 0, pixelfmt, width, height, pixeldata, palettedata);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
void Shader_DefaultScript(parsestate_t *ps, const char *shortname, const void *args)
|
void Shader_DefaultScript(parsestate_t *ps, const char *shortname, const void *args)
|
||||||
{
|
{
|
||||||
const char *f = args;
|
const char *f = args;
|
||||||
|
|
|
@ -32,15 +32,7 @@ void AddPointToBounds (const vec3_t v, vec3_t mins, vec3_t maxs);
|
||||||
qboolean BoundsIntersect (const vec3_t mins1, const vec3_t maxs1, const vec3_t mins2, const vec3_t maxs2);
|
qboolean BoundsIntersect (const vec3_t mins1, const vec3_t maxs1, const vec3_t mins2, const vec3_t maxs2);
|
||||||
void ClearBounds (vec3_t mins, vec3_t maxs);
|
void ClearBounds (vec3_t mins, vec3_t maxs);
|
||||||
|
|
||||||
struct builddata_s
|
|
||||||
{
|
|
||||||
void (*buildfunc)(model_t *mod, msurface_t *surf, struct builddata_s *bd);
|
|
||||||
qboolean paintlightmaps;
|
|
||||||
void *facedata;
|
|
||||||
};
|
|
||||||
void ModBrush_LoadGLStuff(void *ctx, void *data, size_t a, size_t b); //data === builddata_t
|
void ModBrush_LoadGLStuff(void *ctx, void *data, size_t a, size_t b); //data === builddata_t
|
||||||
void Mod_Batches_Build(model_t *mod, builddata_t *bd);
|
|
||||||
shader_t *Mod_RegisterBasicShader(struct model_s *mod, const char *texname, unsigned int usageflags, const char *shadertext, uploadfmt_t pixelfmt, unsigned int width, unsigned int height, void *pixeldata, void *palettedata);
|
|
||||||
|
|
||||||
#ifdef GLQUAKE
|
#ifdef GLQUAKE
|
||||||
#if defined(ANDROID) /*FIXME: actually just to use standard GLES headers instead of full GL*/
|
#if defined(ANDROID) /*FIXME: actually just to use standard GLES headers instead of full GL*/
|
||||||
|
|
Loading…
Reference in a new issue