fix texture glitches when resizing window on Win32