- add support for scaled textures in softpoly

This commit is contained in:
Magnus Norddahl 2018-12-16 15:12:45 +01:00
parent eaf1c4f1e2
commit 15d599813b

View file

@ -50,8 +50,8 @@ void PolyDrawArgs::SetTexture(const uint8_t *texels, int width, int height)
void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, FRenderStyle style)
{
mTexture = texture;
mTextureWidth = texture->GetWidth();
mTextureHeight = texture->GetHeight();
mTextureWidth = texture->GetPhysicalWidth();
mTextureHeight = texture->GetPhysicalHeight();
if (PolyTriangleDrawer::IsBgra())
mTexturePixels = (const uint8_t *)texture->GetPixelsBgra();
else
@ -73,8 +73,8 @@ void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, uint32_t translationID,
mTranslation = table->Remap;
mTexture = texture;
mTextureWidth = texture->GetWidth();
mTextureHeight = texture->GetHeight();
mTextureWidth = texture->GetPhysicalWidth();
mTextureHeight = texture->GetPhysicalHeight();
mTexturePixels = texture->GetPixels(style);
return;
}
@ -83,8 +83,8 @@ void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, uint32_t translationID,
if (style.Flags & STYLEF_RedIsAlpha)
{
mTexture = texture;
mTextureWidth = texture->GetWidth();
mTextureHeight = texture->GetHeight();
mTextureWidth = texture->GetPhysicalWidth();
mTextureHeight = texture->GetPhysicalHeight();
mTexturePixels = texture->GetPixels(style);
}
else