From 6391f4428f945b215730d21ea4fd19affdaf8efb Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 30 Sep 2004 22:45:08 +0000 Subject: [PATCH] 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 --- engine/gl/gl_model.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/engine/gl/gl_model.c b/engine/gl/gl_model.c index 810d9de9c..aa05046cd 100644 --- a/engine/gl/gl_model.c +++ b/engine/gl/gl_model.c @@ -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 ; inumtextures ; i++) { tx = loadmodel->textures[i];