TexMgr_RecalcWarpImageSize: removed early exit if (gl_warpimagesize == oldsize), fixes liquids sometimes turning to noise after a mode change.

after vid_restart TexMgr_ReloadImage reloads textures to tx->source_width/source_height, which might not match oldsize.
fixes: https://sourceforge.net/p/quakespasm/bugs/13/

steps to reproduce (fixed) bug:
-launch at 640x480, windowed, and with "r_oldwater 0"
-do "map start"
-change to 1024x768 windowed
-change to 1920x1080 windowed
-this last mode change makes liquid textures turn into random garbage.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1274 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2016-01-08 08:22:27 +00:00
parent 153eba1f71
commit ba5ce1e5af

View file

@ -568,9 +568,11 @@ void TexMgr_RecalcWarpImageSize (void)
while (gl_warpimagesize > vid.height)
gl_warpimagesize >>= 1;
if (gl_warpimagesize == oldsize)
return;
// ericw -- removed early exit if (gl_warpimagesize == oldsize).
// after vid_restart TexMgr_ReloadImage reloads textures
// to tx->source_width/source_height, which might not match oldsize.
// fixes: https://sourceforge.net/p/quakespasm/bugs/13/
//
// resize the textures in opengl
//