texture size rounding fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3652 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-19 18:42:44 +00:00
parent e2234f086b
commit 5737bb7bc5
+2 -2
View File
@@ -94,8 +94,8 @@ void resizetexture(int w, int h, bool mipmap, GLenum target, int &tw, int &th)
tw = th = 1;
while(tw < w) tw *= 2;
while(th < h) th *= 2;
if(w < tw - tw/2) tw /= 2;
if(h < th - th/2) th /= 2;
if(w < tw - tw/4) tw /= 2;
if(h < th - th/4) th /= 2;
}
else
{