supports norms, and might actually be a tiny bit faster at loading.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@268 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-09-30 22:45:08 +00:00
parent 42b0c88591
commit 6391f4428f
1 changed files with 20 additions and 4 deletions

View File

@ -982,10 +982,22 @@ void GLMod_LoadTextures (lump_t *l)
tx->gl_texturenumbumpmap = 0;
if (gl_bumpmappingpossible && cls.allow_bump)
{
_snprintf(altname, sizeof(altname)-1, "%s_bump", mt->name);
if (gl_load24bit.value)
tx->gl_texturenumbumpmap = Mod_LoadBumpmapTexture(altname);
extern cvar_t gl_bump;
if (gl_bump.value<2) //set to 2 to have faster loading.
{
_snprintf(altname, sizeof(altname)-1, "%s_norm", mt->name);
tx->gl_texturenumbumpmap = Mod_LoadHiResTexture(altname, true, false, false);
}
if (!tx->gl_texturenumbumpmap)
{
if (gl_load24bit.value)
{
_snprintf(altname, sizeof(altname)-1, "%s_bump", mt->name);
tx->gl_texturenumbumpmap = Mod_LoadBumpmapTexture(altname);
}
else
_snprintf(altname, sizeof(altname)-1, "%s_bump", mt->name);
}
if (!(tx->gl_texturenumbumpmap) && loadmodel->fromgame != fg_halflife)
{
@ -1106,6 +1118,10 @@ void GLMod_NowLoadExternal(void)
int i, width, height;
qboolean alphaed;
texture_t *tx;
if (loadmodel->fromgame != fg_halflife)
return;
for (i=0 ; i<loadmodel->numtextures ; i++)
{
tx = loadmodel->textures[i];