- made the necessary adjustments to the HW2D interfaces to handle alpha textures properly.

These cannot be done with the regular textures so there needs to be an option to create more than one native texture per FTexture. For completeness' sake there is also the option now to create a paletted version of a texture if the regular one is true color. This fixes a long standing problem that translations were not applied to non-paletted textures.
This commit is contained in:
Christoph Oelckers 2018-03-23 23:04:30 +01:00
commit 7301001a3f
9 changed files with 87 additions and 106 deletions

View file

@ -1161,10 +1161,12 @@ void DFrameBuffer::DrawBlendingRect()
// DFrameBuffer :: CreateTexture
//
// Creates a native texture for a game texture, if supported.
// The hardware renderer does not use this interface because it is
// far too limited
//
//==========================================================================
FNativeTexture *DFrameBuffer::CreateTexture(FTexture *gametex, bool wrapping)
FNativeTexture *DFrameBuffer::CreateTexture(FTexture *gametex, FTextureFormat fmt, bool wrapping)
{
return NULL;
}
@ -1261,6 +1263,12 @@ FNativePalette::~FNativePalette()
FNativeTexture::~FNativeTexture()
{
// Remove link from the game texture
if (mGameTex != nullptr)
{
mGameTex->Native[mFormat] = nullptr;
}
}
bool FNativeTexture::CheckWrapping(bool wrapping)