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:
parent
42b0c88591
commit
6391f4428f
1 changed files with 20 additions and 4 deletions
|
@ -982,10 +982,22 @@ void GLMod_LoadTextures (lump_t *l)
|
||||||
tx->gl_texturenumbumpmap = 0;
|
tx->gl_texturenumbumpmap = 0;
|
||||||
if (gl_bumpmappingpossible && cls.allow_bump)
|
if (gl_bumpmappingpossible && cls.allow_bump)
|
||||||
{
|
{
|
||||||
_snprintf(altname, sizeof(altname)-1, "%s_bump", mt->name);
|
extern cvar_t gl_bump;
|
||||||
|
if (gl_bump.value<2) //set to 2 to have faster loading.
|
||||||
if (gl_load24bit.value)
|
{
|
||||||
tx->gl_texturenumbumpmap = Mod_LoadBumpmapTexture(altname);
|
_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)
|
if (!(tx->gl_texturenumbumpmap) && loadmodel->fromgame != fg_halflife)
|
||||||
{
|
{
|
||||||
|
@ -1106,6 +1118,10 @@ void GLMod_NowLoadExternal(void)
|
||||||
int i, width, height;
|
int i, width, height;
|
||||||
qboolean alphaed;
|
qboolean alphaed;
|
||||||
texture_t *tx;
|
texture_t *tx;
|
||||||
|
|
||||||
|
if (loadmodel->fromgame != fg_halflife)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i=0 ; i<loadmodel->numtextures ; i++)
|
for (i=0 ; i<loadmodel->numtextures ; i++)
|
||||||
{
|
{
|
||||||
tx = loadmodel->textures[i];
|
tx = loadmodel->textures[i];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue