more texture tweeks from Griever: gl_external_textures

This commit is contained in:
Bill Currie 2003-12-23 08:38:33 +00:00
parent 9f76665963
commit 4b6b5135ac
2 changed files with 11 additions and 2 deletions

View file

@ -463,6 +463,7 @@ void Mod_Print (void);
extern struct cvar_s *gl_mesh_cache; extern struct cvar_s *gl_mesh_cache;
extern struct cvar_s *gl_subdivide_size; extern struct cvar_s *gl_subdivide_size;
extern struct cvar_s *gl_alias_render_tri; extern struct cvar_s *gl_alias_render_tri;
extern struct cvar_s *gl_external_textures;
extern model_t *loadmodel; extern model_t *loadmodel;
extern char *loadname; extern char *loadname;
extern byte *mod_base; extern byte *mod_base;

View file

@ -61,6 +61,7 @@ texture_t *r_notexture_mip;
cvar_t *gl_mesh_cache; cvar_t *gl_mesh_cache;
cvar_t *gl_subdivide_size; cvar_t *gl_subdivide_size;
cvar_t *gl_alias_render_tri; cvar_t *gl_alias_render_tri;
cvar_t *gl_external_textures;
static void Mod_CallbackLoad (void *object, cache_allocator_t allocator); static void Mod_CallbackLoad (void *object, cache_allocator_t allocator);
@ -103,7 +104,12 @@ Mod_Init_Cvars (void)
gl_mesh_cache = Cvar_Get ("gl_mesh_cache", "256", CVAR_ARCHIVE, NULL, gl_mesh_cache = Cvar_Get ("gl_mesh_cache", "256", CVAR_ARCHIVE, NULL,
"minimum triangle count in a model for its mesh" "minimum triangle count in a model for its mesh"
" to be cached. 0 to disable caching"); " to be cached. 0 to disable caching");
gl_alias_render_tri = Cvar_Get("gl_alias_render_tri", "0", CVAR_ARCHIVE, NULL, "When loading alias models mesh for pure triangle rendering"); gl_alias_render_tri =
Cvar_Get("gl_alias_render_tri", "0", CVAR_ARCHIVE, NULL,
"When loading alias models mesh for pure triangle rendering");
gl_external_textures =
Cvar_Get("gl_external_textures", "1", CVAR_ARCHIVE, NULL,
"Use external .png, .tga or .pcx to replace BSP textures");
} }
void void
@ -203,6 +209,8 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
default: default:
Mod_LoadBrushModel (mod, buf); Mod_LoadBrushModel (mod, buf);
if (gl_external_textures->int_val)
Mod_LoadExternalTextures (mod); Mod_LoadExternalTextures (mod);
break; break;
} }