- decoupled the software renderer entirely from FTexture - it will only look at FSoftwareTexture now, all access to the texture manager has been wrapped.

This commit is contained in:
Christoph Oelckers 2020-04-14 00:42:13 +02:00
commit 9593cb56ae
23 changed files with 170 additions and 162 deletions

View file

@ -44,7 +44,7 @@ EXTERN_CVAR(Int, gl_texture_hqresizemult)
EXTERN_CVAR(Int, gl_texture_hqresizemode)
EXTERN_CVAR(Int, gl_texture_hqresize_targets)
FWarpTexture::FWarpTexture (FTexture *source, int warptype)
FWarpTexture::FWarpTexture (FGameTexture *source, int warptype)
: FSoftwareTexture (source)
{
if (warptype == 2) SetupMultipliers(256, 128);
@ -69,7 +69,7 @@ const uint32_t *FWarpTexture::GetPixelsBgra()
auto otherpix = FSoftwareTexture::GetPixelsBgra();
WarpedPixelsRgba.Resize(unsigned(GetWidth() * GetHeight() * resizeMult * resizeMult * 4 / 3 + 1));
WarpBuffer(WarpedPixelsRgba.Data(), otherpix, int(GetWidth() * resizeMult), int(GetHeight() * resizeMult), WidthOffsetMultiplier, HeightOffsetMultiplier, time, mTexture->shaderspeed, bWarped);
WarpBuffer(WarpedPixelsRgba.Data(), otherpix, int(GetWidth() * resizeMult), int(GetHeight() * resizeMult), WidthOffsetMultiplier, HeightOffsetMultiplier, time, mTexture->GetShaderSpeed(), bWarped);
GenerateBgraMipmapsFast();
FreeAllSpans();
GenTime[2] = time;
@ -90,7 +90,7 @@ const uint8_t *FWarpTexture::GetPixels(int index)
const uint8_t *otherpix = FSoftwareTexture::GetPixels(index);
WarpedPixels[index].Resize(unsigned(GetWidth() * GetHeight() * resizeMult * resizeMult));
WarpBuffer(WarpedPixels[index].Data(), otherpix, int(GetWidth() * resizeMult), int(GetHeight() * resizeMult), WidthOffsetMultiplier, HeightOffsetMultiplier, time, mTexture->shaderspeed, bWarped);
WarpBuffer(WarpedPixels[index].Data(), otherpix, int(GetWidth() * resizeMult), int(GetHeight() * resizeMult), WidthOffsetMultiplier, HeightOffsetMultiplier, time, mTexture->GetShaderSpeed(), bWarped);
FreeAllSpans();
GenTime[index] = time;
}