mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-07 08:21:04 +00:00
- add support for scaled textures in softpoly
This commit is contained in:
parent
eaf1c4f1e2
commit
15d599813b
1 changed files with 6 additions and 6 deletions
|
@ -50,8 +50,8 @@ void PolyDrawArgs::SetTexture(const uint8_t *texels, int width, int height)
|
||||||
void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, FRenderStyle style)
|
void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, FRenderStyle style)
|
||||||
{
|
{
|
||||||
mTexture = texture;
|
mTexture = texture;
|
||||||
mTextureWidth = texture->GetWidth();
|
mTextureWidth = texture->GetPhysicalWidth();
|
||||||
mTextureHeight = texture->GetHeight();
|
mTextureHeight = texture->GetPhysicalHeight();
|
||||||
if (PolyTriangleDrawer::IsBgra())
|
if (PolyTriangleDrawer::IsBgra())
|
||||||
mTexturePixels = (const uint8_t *)texture->GetPixelsBgra();
|
mTexturePixels = (const uint8_t *)texture->GetPixelsBgra();
|
||||||
else
|
else
|
||||||
|
@ -73,8 +73,8 @@ void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, uint32_t translationID,
|
||||||
mTranslation = table->Remap;
|
mTranslation = table->Remap;
|
||||||
|
|
||||||
mTexture = texture;
|
mTexture = texture;
|
||||||
mTextureWidth = texture->GetWidth();
|
mTextureWidth = texture->GetPhysicalWidth();
|
||||||
mTextureHeight = texture->GetHeight();
|
mTextureHeight = texture->GetPhysicalHeight();
|
||||||
mTexturePixels = texture->GetPixels(style);
|
mTexturePixels = texture->GetPixels(style);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -83,8 +83,8 @@ void PolyDrawArgs::SetTexture(FSoftwareTexture *texture, uint32_t translationID,
|
||||||
if (style.Flags & STYLEF_RedIsAlpha)
|
if (style.Flags & STYLEF_RedIsAlpha)
|
||||||
{
|
{
|
||||||
mTexture = texture;
|
mTexture = texture;
|
||||||
mTextureWidth = texture->GetWidth();
|
mTextureWidth = texture->GetPhysicalWidth();
|
||||||
mTextureHeight = texture->GetHeight();
|
mTextureHeight = texture->GetPhysicalHeight();
|
||||||
mTexturePixels = texture->GetPixels(style);
|
mTexturePixels = texture->GetPixels(style);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue