TexMgr_SafeTextureSize: take advantage of NPOT textures for mdl skins, 2d graphics, etc. Uses about 35% less texture memory on start.bsp.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1163 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2015-02-06 06:46:08 +00:00
parent 7be39c651e
commit 4618546e6c

View file

@ -663,7 +663,8 @@ TexMgr_SafeTextureSize -- return a size with hardware and user prefs in mind
*/
int TexMgr_SafeTextureSize (int s)
{
s = TexMgr_Pad(s);
if (!gl_texture_NPOT)
s = TexMgr_Pad(s);
if ((int)gl_max_size.value > 0)
s = q_min(TexMgr_Pad((int)gl_max_size.value), s);
s = q_min(gl_hardware_maxsize, s);